content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace UnitTest.Rollbar.Deploys
{
using global::Rollbar;
using global::Rollbar.Deploys;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
[TestClass]
[TestCategory(nameof(RollbarDeploysManagerFixture))]
public class RollbarDeploysManagerFixture
{
private readonly IRollbarDeploysManager _deploysManager =
RollbarDeploysManagerFactory.CreateRollbarDeploysManager(
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.DeploymentsReadAccessToken
);
[TestInitialize]
public void SetupFixture()
{
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
}
[TestCleanup]
public void TearDownFixture()
{
}
private ICollection<IDeploymentDetails> GetAllDeployments()
{
List<IDeploymentDetails> deployments = new List<IDeploymentDetails>();
int pageCount = 0;
int pageItems;
do
{
var task = this._deploysManager.GetDeploymentsPageAsync(RollbarUnitTestSettings.Environment, ++pageCount);
task.Wait(TimeSpan.FromSeconds(3));
pageItems = task.Result.Length;
if (pageItems > 0)
{
deployments.AddRange(task.Result);
}
Assert.IsNull(task.Exception);
Thread.Sleep(TimeSpan.FromMilliseconds(250));
}
while (pageItems > 0);
return deployments;
}
[TestMethod]
public void TestRollbarDeploysManager()
{
var initialDeployments = this.GetAllDeployments();
var deployment = DeploymentFactory.CreateDeployment(
environment: RollbarUnitTestSettings.Environment,
revision: "99909a3a5a3dd4363f414161f340b582bb2e4161",
comment: "Some new unit test deployment @ " + DateTimeOffset.Now,
localUserName: "UnitTestRunner",
rollbarUserName: "rollbar"
);
var task = this._deploysManager.RegisterAsync(deployment);
task.Wait(TimeSpan.FromSeconds(3));
Assert.IsNull(task.Exception);
Thread.Sleep(TimeSpan.FromMilliseconds(250));
var deployments = this.GetAllDeployments();
Trace.WriteLine($"Initial deployments count : {initialDeployments.Count}");
Trace.WriteLine($"Deployments count : {deployments.Count}");
Assert.IsTrue(initialDeployments.Count < deployments.Count);
var latestDeployment = deployments.FirstOrDefault();
Assert.IsNotNull(latestDeployment);
var getDeploymentTask = this._deploysManager.GetDeploymentAsync(latestDeployment.DeployID);
getDeploymentTask.Wait(TimeSpan.FromSeconds(3));
Assert.IsNull(getDeploymentTask.Exception);
var deploymentDetails = getDeploymentTask.Result;
Assert.IsNotNull(getDeploymentTask);
Assert.AreEqual(deploymentDetails.Comment, latestDeployment.Comment);
Assert.AreEqual(deploymentDetails.DeployID, latestDeployment.DeployID);
Assert.AreEqual(deploymentDetails.EndTime, latestDeployment.EndTime);
Assert.AreEqual(deploymentDetails.Environment, latestDeployment.Environment);
Assert.AreEqual(deploymentDetails.LocalUsername, latestDeployment.LocalUsername);
Assert.AreEqual(deploymentDetails.ProjectID, latestDeployment.ProjectID);
Assert.AreEqual(deploymentDetails.Revision, latestDeployment.Revision);
Assert.AreEqual(deploymentDetails.RollbarUsername, latestDeployment.RollbarUsername);
Assert.AreEqual(deploymentDetails.StartTime, latestDeployment.StartTime);
}
}
}
| 40.882353 | 122 | 0.647482 | [
"MIT"
] | Janek91/Rollbar.NET | UnitTest.Rollbar.Deploys/RollbarDeploysManagerFixture.cs | 4,172 | C# |
using System;
using System.Text;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.IdentityModel.Tokens;
using Abp.AspNetCore;
using Abp.AspNetCore.Configuration;
using Abp.AspNetCore.SignalR;
using Abp.Modules;
using Abp.Reflection.Extensions;
using Abp.Zero.Configuration;
using MyPortal.Authentication.JwtBearer;
using MyPortal.Configuration;
using MyPortal.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
using Abp.Configuration.Startup;
namespace MyPortal
{
[DependsOn(
typeof(MyPortalApplicationModule),
typeof(MyPortalEntityFrameworkModule),
typeof(AbpAspNetCoreModule)
, typeof(AbpAspNetCoreSignalRModule)
)]
public class MyPortalWebCoreModule : AbpModule
{
private readonly IWebHostEnvironment _env;
private readonly IConfigurationRoot _appConfiguration;
public MyPortalWebCoreModule(IWebHostEnvironment env)
{
_env = env;
_appConfiguration = env.GetAppConfiguration();
}
public override void PreInitialize()
{
Configuration.DefaultNameOrConnectionString = _appConfiguration.GetConnectionString(
MyPortalConsts.ConnectionStringName
);
//在开发环境下发送所有错误信息到前端
if (_env.IsDevelopment())
{
Configuration.Modules.AbpWebCommon().SendAllExceptionsToClients = true;
}
// Use database for language management
Configuration.Modules.Zero().LanguageManagement.EnableDbLocalization();
Configuration.Modules.AbpAspNetCore()
.CreateControllersForAppServices(
typeof(MyPortalApplicationModule).GetAssembly()
);
ConfigureTokenAuth();
}
private void ConfigureTokenAuth()
{
IocManager.Register<TokenAuthConfiguration>();
var tokenAuthConfig = IocManager.Resolve<TokenAuthConfiguration>();
tokenAuthConfig.SecurityKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(_appConfiguration["Authentication:JwtBearer:SecurityKey"]));
tokenAuthConfig.Issuer = _appConfiguration["Authentication:JwtBearer:Issuer"];
tokenAuthConfig.Audience = _appConfiguration["Authentication:JwtBearer:Audience"];
tokenAuthConfig.SigningCredentials = new SigningCredentials(tokenAuthConfig.SecurityKey, SecurityAlgorithms.HmacSha256);
tokenAuthConfig.Expiration = TimeSpan.FromDays(1);
}
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(typeof(MyPortalWebCoreModule).GetAssembly());
}
}
} | 35.545455 | 151 | 0.691633 | [
"MIT"
] | JontyMin/52abp_example | src/MyPortal/src/myportal-aspnet-core/src/MyPortal.Web.Core/MyPortalWebCoreModule.cs | 2,771 | C# |
using System;
using System.Collections.Generic;
using System.Text;
using HttpPack;
using DasBuildAgent.Models;
namespace DasBuildAgent.Controllers
{
[IsPrimaryController]
[IsController]
class TaskController
{
[IsPrimaryAction]
public static HttpContent Index(HttpRequest request)
{
var sample = new JsonKeyValuePairs
{
{ "test", "ok" }
};
return new HttpJsonContent(sample);
}
public static HttpContent Start(HttpRequest request)
{
var agent = (Agent)request.UserData;
var taskStartRequest = new TaskStartRequest(request, agent.Secret);
agent.CommandQueue.QueueCommand(Agent.Commands.StartTask, taskStartRequest);
var sample = new JsonKeyValuePairs
{
{ "message", "task starting" }
};
return new HttpJsonContent(sample);
}
}
}
| 24.35 | 88 | 0.591376 | [
"MIT"
] | kboronka/das-build-agent | src/Controllers/TaskController.cs | 976 | C# |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using Bloom.Book;
using Bloom.FontProcessing;
using Bloom.ToPalaso;
using Bloom.Utils;
using Bloom.web;
using Bloom.web.controllers;
using BloomTemp;
using L10NSharp;
#if __MonoCS__
using SIL.CommandLineProcessing;
#else
using NAudio.Wave;
#endif
using SIL.IO;
using SIL.PlatformUtilities;
using SIL.Reporting;
using SIL.Text;
using SIL.Xml;
namespace Bloom.Publish.Epub
{
/// <summary>
/// This class handles the process of creating an ePUB out of a bloom book.
/// The process has two stages, corresponding to the way our UI displays a preview and
/// then allows the user to save. We 'stage' the ePUB by generating all the files into a
/// temporary folder. Then, if the user says to save, we actually zip them into an ePUB.
///
/// Currently, we don't attempt to support sophisticated page layouts in epubs.
/// For one thing, we have not identified any epub readers on phones that support enough
/// EPUB3/HTML features to actually make an EPUB3 fixed-layout page that looks exactly
/// like what Bloom puts on paper. For another, the device screen might be much smaller
/// than the page was designed for, and the user might be annoyed if he has to zoom
/// and scroll horizontally, or that the page does not obey the reader's font controls.
///
/// So, instead, we currently only attempt to support pages with a basically vertical layout.
/// Bloom will do something with more complex ones, but it won't look much like the
/// original. Basically, we will arrange the page elements one below the other, make the
/// pictures about the original fraction of page wide, and hope for the best.
/// Thus, any sort of side-by-side layout will be lost in epubs.
///
/// There is also no guarantee that what started out as a single page will fit on one
/// screen in the reader. All readers we have tested will split a source page (which
/// they treat more like a chapter) into as many pages as needed to show all the content.
/// But a picture is not guaranteed to be on the same screen as text that was supposed
/// to be on the same page.
///
/// We do output styles that should control text font and size, but readers vary widely
/// in whether they obey these at all and, if so, how they interpret a particular font
/// size.
///
/// Epubs deliberately omit blank pages.
///
/// Epubs currently have a very simplistic table of contents, with entries for the
/// start of the book and the first content page.
///
/// We also simplified in various other ways:
/// - although we generally embed fonts used in the document, we don't embed any that
/// indicate they do not permit embedding. Currently we don't give any warning about this,
/// nor any way for the user to override it if he actually has the right to embed.
/// - to save space, we don't embed bold or italic variants of embedded fonts,
/// even if bold or italic text in those fonts occurs.
/// - we also don't support vertical alignment control (in what height would we vertically
/// align something?); each element just takes up as much vertical space as it needs.
/// - Currently epubs can only contain audio for one language--the primary vernacular one.
/// </summary>
public class EpubMaker : IDisposable
{
public delegate EpubMaker Factory();// autofac uses this
public const string kEPUBExportFolder = "ePUB_export";
private const int kPathMax = 260; // maximum path length on Windows (including terminating NUL)
protected const string kEpubNamespace = "http://www.idpf.org/2007/ops";
public const string kAudioFolder = "audio";
public const string kImagesFolder = "images";
public const string kCssFolder = "css";
public const string kFontsFolder = "fonts";
public const string kVideoFolder = "video";
private Guid _thumbnailRequestId;
private HashSet<string> _omittedPageLabels = new HashSet<string>();
public static readonly string EpubExportRootFolder = Path.Combine(Path.GetTempPath(), kEPUBExportFolder);
public Book.Book Book
{
get { return _book; }
internal set { _book = value; }
}
private Book.Book _book;
private Book.Book _originalBook;
// This is a shorthand for _book.Storage. Since that is something of an implementation secret of Book,
// it also provides a safe place for us to make changes if we ever need to get the Storage some other way.
private IBookStorage Storage
{
get { return _book.Storage; }
}
// The only reason this isn't just ../* is performance. We could change it. It comes from the need to actually
// remove any elements that the style rules would hide, becuase epub readers ignore visibility settings.
private string kSelectThingsThatCanBeHidden = ".//div | .//img";
// Keeps track of IDs that have been used in the manifest. These are generated to roughly match file
// names, but the algorithm could pathologically produce duplicates, so we guard against this.
private HashSet<string> _idsUsed = new HashSet<string>();
// Keeps track of the ID actually generated for each resource. This is generally algorithmic,
// but in case of duplicates the ID for an item might not be what the algorithm predicts.
private Dictionary<string, string> _mapItemToId = new Dictionary<string, string>();
// Keep track of the files we already copied to the ePUB, so we don't copy them again to a new name.
private Dictionary<string, string> _mapSrcPathToDestFileName = new Dictionary<string, string>();
// All the things (files) we need to list in the manifest
private List<string> _manifestItems;
// xhtml files with <script> element or onxxx= attributes
private List<string> _scriptedItems;
// xhtml files that refer to an svg image
private List<string> _svgItems;
// Duration of each item of type application/smil+xml (key is ID of item)
Dictionary<string, TimeSpan> _pageDurations = new Dictionary<string, TimeSpan>();
// The things we need to list in the 'spine'...defines the normal reading order of the book
private List<string> _spineItems;
// files that should be marked linear="no" in the spine.
private HashSet<string> _nonLinearSpineItems;
// Maps bloom page to a back link that needs to point to it once we know its name.
// The back link must be later in the document, otherwise, it will get output incomplete.
private Dictionary<XmlElement, List<Tuple<XmlElement, string>>> _pendingBackLinks;
// Maps bloom-page elements to the file name we would like to use for that page.
// Used for image description pages which we want out of the usual naming sequence.
// One reason is that we want to know the file name in advance when we create the
// link to the image description, and at that point we don't know what page number
// it will have because we haven't finished evaluating which pages to omit as blank.
private Dictionary<XmlElement, string> _desiredNameMap;
// Counter for creating output page files.
int _pageIndex;
// Counter for referencing unrecognized "required singleton" (front/back matter?) pages.
int _frontBackPage;
// list of language ids to use for trying to localize names of front/back matter pages.
string[] _langsForLocalization;
// We track the first page that is actually content and link to it in our rather trivial table of contents.
private string _firstContentPageItem;
private string _contentFolder;
private string _navFileName;
// This temporary folder holds the staging folder with the bloom content. It also (temporarily)
// holds a copy of the Readium code, since I haven't been able to figure out how to get that
// code to redirect to display a folder which isn't a child of the folder containing the
// readium HTML.
private TemporaryFolder _outerStagingFolder;
public string BookInStagingFolder { get; private set; }
private BookThumbNailer _thumbNailer;
public bool PublishWithoutAudio { get; set; }
private PublishHelper _publishHelper = new PublishHelper();
private HashSet<string> _fontsUsedInBook = new HashSet<string>();
private BookServer _bookServer;
// Ordered list of Table of Content entries.
List<string> _tocList = new List<string>();
// Ordered list of page navigation list item elements.
private List<string> _pageList = new List<string>();
// flag whether we've seen the first page with class numberedPage
private bool _firstNumberedPageSeen;
// image counter for creating id values
private int _imgCount;
/// <summary>
/// Preparing a book for publication involves displaying it in a browser in order
/// to accurately determine which elements are invisible and can be pruned from the
/// published book. This requires being on the UI thread, which may require having
/// a Control available for calling Invoke() which will move execution to the UI
/// thread.
/// </summary>
public Control ControlForInvoke
{
get { return _publishHelper.ControlForInvoke; }
set { _publishHelper.ControlForInvoke = value; }
}
public bool AbortRequested
{
get { return _abortRequested; }
set
{
_abortRequested = value;
if (_abortRequested && _thumbNailer != null && _thumbnailRequestId != Guid.Empty)
{
_thumbNailer.CancelOrder(_thumbnailRequestId);
}
}
}
// Only make one audio file per page. This means if there are multiple recorded sentences on a page,
// Epubmaker will squash them into one, compress it, and make smil entries with appropriate offsets.
// This is closer to how the standard Moby Dick example is done, and at least one epub reader
// (Simply Reading by Daisy) skips a lot of audio segments if we do one per sentence, but works
// better with this approach. Nothing that we know of does less well, so for now, this is always
// set true in real epub creation. Most of our unit tests predate it, however, and rather than
// try to update all that would be affected I am leaving the default false.
public bool OneAudioPerPage { get; set; }
/// <summary>
/// Set to true for unpaginated output. This is something of a misnomer...any better ideas?
/// If it is true (which currently it always is), we remove the stylesheets for precise page layout
/// and just output the text and pictures in order with a simple default stylesheet.
/// Rather to my surprise, the result still has page breaks where expected, though the reader may
/// add more if needed.
/// </summary>
public bool Unpaginated { get; set; }
public BookInfo.HowToPublishImageDescriptions PublishImageDescriptions { get; set; }
public bool RemoveFontSizes { get; set; }
public EpubMaker(BookThumbNailer thumbNailer, BookServer bookServer)
{
_thumbNailer = thumbNailer;
_bookServer = bookServer;
}
/// <summary>
/// Generate all the files we will zip into the ePUB for the current book into the StagingFolder.
/// It is required that the parent of the StagingFolder is a temporary folder into which we can
/// copy the Readium stuff. This folder is deleted when the EpubMaker is disposed.
/// </summary>
public void StageEpub(WebSocketProgress progress, bool publishWithoutAudio = false)
{
PublishWithoutAudio = publishWithoutAudio;
if (!string.IsNullOrEmpty(BookInStagingFolder))
return; //already staged
var message = new LicenseChecker().CheckBook(Book, Book.ActiveLanguages.ToArray());
if (message != null)
{
progress.MessageWithoutLocalizing(message, ProgressKind.Error);
return;
}
// BringBookUpToDate() will already have been done on the original book on entering the Publish tab.
progress.Message("BuildingEPub", comment: "Shown in a progress box when Bloom is starting to create an ePUB",
message: "Building ePUB");
_langsForLocalization = Book.BookData.GetBasicBookLanguageCodes().ToArray();
// robustly come up with a directory we can use, even if previously used directories are locked somehow
Directory.CreateDirectory(EpubExportRootFolder); // this is ok if it already exists
for (var i = 0; i < 20; i++)
{
var dir = Path.Combine(EpubExportRootFolder, i.ToString());
if (Directory.Exists(dir))
{
// see if we can delete this old directory first
if (!SIL.IO.RobustIO.DeleteDirectoryAndContents(dir))
{
progress.MessageWithoutLocalizing("could not remove " + dir);
continue; // if not, let's change the target directory name and try again
}
}
Directory.CreateDirectory(dir);
_outerStagingFolder = TemporaryFolder.TrackExisting(dir);
break;
}
var tempBookPath = Path.Combine(_outerStagingFolder.FolderPath, Path.GetFileName(Book.FolderPath));
_originalBook = _book;
if (_bookServer != null)
{
// It should only be null while running unit tests which don't create a physical file.
_book = PublishHelper.MakeDeviceXmatterTempBook(_book.FolderPath, _bookServer, tempBookPath, _book.IsTemplateBook, _omittedPageLabels);
}
// The readium control remembers the current page for each book.
// So it is useful to have a unique name for each one.
// However, it needs to be something we can put in a URL without complications,
// so a guid is better than say the book's own folder name.
var id64 = Convert.ToBase64String(new Guid(_book.ID).ToByteArray()).Replace("/","_").Replace("+","-").Trim(new[] {'='});
BookInStagingFolder = Path.Combine(_outerStagingFolder.FolderPath, id64);
if (Platform.IsWindows)
{
// https://issues.bloomlibrary.org/youtrack/issue/BH-5988 has a book with an image file whose name is 167 characters long.
// "C:\Users\steve\AppData\Local\Temp\ePUB_export\0" is already 47 characters long, and usernames can certainly be longer
// than 5 characters. So we can't really afford much more in the folder name. Certainly adding the full GUID will make
// this file's path too long, throwing an exception rather than creating an ePUB. (This may not happen on the local user's
// machine, but certainly will on the harvester machine.)
var longestName = DirectoryUtils.GetLongestFilename(_book.FolderPath);
// Most likely an image file which is buried deepest in ePUB format.
var maxPathNeeded = BookInStagingFolder.Length + longestName.Length + 17; // 17 accounts for @"\content\images\" plus NUL at end.
if (maxPathNeeded >= kPathMax)
{
var needToShrink = maxPathNeeded - kPathMax;
if (needToShrink < id64.Length)
BookInStagingFolder = Path.Combine(_outerStagingFolder.FolderPath, id64.Substring(0, id64.Length - needToShrink));
else
throw new System.IO.PathTooLongException($"\"{Path.Combine(_outerStagingFolder.FolderPath, id64)}\" is too long for the local Windows filesystem to handle even with shrinking the id foldername.");
}
}
// in case of previous versions // Enhance: delete when done? Generate new name if conflict?
var contentFolderName = "content";
_contentFolder = Path.Combine(BookInStagingFolder, contentFolderName);
Directory.CreateDirectory(_contentFolder); // also creates parent staging directory
_pageIndex = 0;
_manifestItems = new List<string>();
_spineItems = new List<string>();
_nonLinearSpineItems = new HashSet<string>();
_pendingBackLinks = new Dictionary<XmlElement, List<Tuple<XmlElement, string>>>();
_desiredNameMap = new Dictionary<XmlElement, string>();
_scriptedItems = new List<string>();
_svgItems = new List<string>();
_firstContentPageItem = null;
_fontsUsedInBook.Clear();
ISet<string> warningMessages = new HashSet<string>();
Book.OurHtmlDom.AddPublishClassToBody("epub");
HandleImageDescriptions(Book.OurHtmlDom);
if (string.IsNullOrEmpty(SignLanguageApi.FfmpegProgram))
{
Logger.WriteEvent("Cannot find ffmpeg program while preparing videos for publishing.");
}
FixInternalHyperlinks(progress);
var nsManager = new XmlNamespaceManager(Book.RawDom.NameTable);
nsManager.AddNamespace("svg", "http://www.w3.org/2000/svg");
var pageLabelProgress = progress.WithL10NPrefix("TemplateBooks.PageLabel.");
foreach (XmlElement pageElement in Book.GetPageElements())
{
var pageLabelEnglish = HtmlDom.GetNumberOrLabelOfPageWhereElementLives(pageElement);
var comicalMatches = pageElement.SafeSelectNodes(".//svg:svg[contains(@class, 'comical-generated')]", nsManager);
if (comicalMatches.Count > 0)
{
progress.Message("Common.Error", "Error", ProgressKind.Error, false);
progress.MessageWithParams("PublishTab.Epub.NoOverlaySupport", "Error shown if book contains overlays.", "Sorry, Bloom cannot produce ePUBs if there are any overlays. The first overlay is on page {0}.", ProgressKind.Error, pageLabelEnglish);
AbortRequested = true;
}
// We could check for this in a few more places, but once per page seems enough in practice.
if (AbortRequested)
break;
if (MakePageFile(pageElement, warningMessages))
{
pageLabelProgress.Message(pageLabelEnglish, pageLabelEnglish);
};
}
PublishHelper.SendBatchedWarningMessagesToProgress(warningMessages, progress);
if (_omittedPageLabels.Any())
{
progress.Message("OmittedPages",
"The following pages were removed because they are not supported in ePUBs:",
ProgressKind.Warning);
foreach (var label in _omittedPageLabels.OrderBy(x => x))
{
progress.MessageWithoutLocalizing(label, ProgressKind.Warning);
}
}
var epubThumbnailImagePath = Path.Combine(Book.FolderPath, "epub-thumbnail.png");
// If we don't have an epub thumbnail, create a nice large thumbnail of the cover image
// with the desired name. This is a temporary file stored only in the staged book folder
// before being added to the epub.
if (!RobustFile.Exists(epubThumbnailImagePath))
{
string coverPageImageFile = "thumbnail-256.png"; // name created by _thumbNailer
ApplicationException thumbNailException = null;
try
{
_thumbnailRequestId = Guid.NewGuid();
_thumbNailer.MakeThumbnailOfCover(Book, 256, _thumbnailRequestId);
_thumbnailRequestId = Guid.Empty;
}
catch (ApplicationException e)
{
thumbNailException = e;
}
if (AbortRequested)
return; // especially to avoid reporting problems making thumbnail, e.g., because aborted.
var coverPageImagePath = Path.Combine(Book.FolderPath, coverPageImageFile);
if (thumbNailException != null || !RobustFile.Exists(coverPageImagePath))
{
NonFatalProblem.Report(ModalIf.All, PassiveIf.All,
"Bloom failed to make a high-quality cover page for your book (BL-3209)",
"We will try to make the book anyway, but you may want to try again.",
thumbNailException);
coverPageImageFile = "thumbnail.png"; // Try a low-res image, which should always exist
coverPageImagePath = Path.Combine(Book.FolderPath, coverPageImageFile);
if (!RobustFile.Exists(coverPageImagePath))
{
// I don't think we can make an epub without a cover page so at this point we've had it.
// I suppose we could recover without actually crashing but it doesn't seem worth it unless this
// actually happens to real users.
throw new FileNotFoundException("Could not find or create thumbnail for cover page (BL-3209)",
coverPageImageFile);
}
}
RobustFile.Move(coverPageImagePath, epubThumbnailImagePath);
}
CopyFileToEpub(epubThumbnailImagePath, true, true, kImagesFolder);
EmbedFonts(); // must call after copying stylesheets
MakeNavPage();
//supporting files
// Fixed requirement for all epubs
RobustFile.WriteAllText(Path.Combine(BookInStagingFolder, "mimetype"), @"application/epub+zip");
var metaInfFolder = Path.Combine(BookInStagingFolder, "META-INF");
Directory.CreateDirectory(metaInfFolder);
var containerXmlPath = Path.Combine(metaInfFolder, "container.xml");
RobustFile.WriteAllText(containerXmlPath, @"<?xml version='1.0' encoding='utf-8'?>
<container version='1.0' xmlns='urn:oasis:names:tc:opendocument:xmlns:container'>
<rootfiles>
<rootfile full-path='content/content.opf' media-type='application/oebps-package+xml'/>
</rootfiles>
</container>");
MakeManifest(kImagesFolder + "/" + Path.GetFileName(epubThumbnailImagePath));
foreach (var filename in Directory.EnumerateFiles(Path.Combine(_contentFolder, kImagesFolder), "*.*"))
{
if (Path.GetExtension(filename).ToLowerInvariant() == ".svg")
PruneSvgFileOfCruft(filename);
}
}
/// <summary>
/// Internal hyperlinks, typically from one page to another, cannot be made to work in Epubs
/// (at least not in any obvious way), since each page is a separate document. Certainly the
/// hrefs we use in the main document, starting with a # that is understood to refer to the element
/// with specified ID in the SAME document, will not work. For now, we just issue a warning
/// and remove the hyperlink wrapper from whatever is inside it.
/// </summary>
/// <param name="progress"></param>
private void FixInternalHyperlinks(WebSocketProgress progress)
{
var internalHyperlinks = Book.OurHtmlDom.SafeSelectNodes("//a[starts-with(@href, '#')]");
if (internalHyperlinks.Count > 0)
{
var msg = LocalizationManager.GetString("PublishTab.Epub.LocalLinksProblem",
"Links to other pages do not work in epubs. They will be changed to plain text that does not look like a link.");
progress.MessageWithoutLocalizing(msg, ProgressKind.Warning);
foreach (var link in internalHyperlinks.Cast<XmlElement>().ToArray())
{
link.UnwrapElement();
}
}
}
private void MakeManifest(string coverPageImageFile)
{
// content.opf: contains primarily the manifest, listing all the content files of the ePUB.
var manifestPath = Path.Combine(_contentFolder, "content.opf");
XNamespace opf = "http://www.idpf.org/2007/opf";
var rootElt = new XElement(opf + "package",
new XAttribute("version", "3.0"),
new XAttribute("unique-identifier", "I" + Book.ID),
new XAttribute("prefix", "a11y: http://www.idpf.org/epub/vocab/package/a11y/# epub32: https://w3c.github.io/publ-epub-revision/epub32/spec/epub-packages.html#"));
// add metadata
var dcNamespace = "http://purl.org/dc/elements/1.1/";
var source = GetBookSource();
XNamespace dc = dcNamespace;
var bookMetaData = Book.BookInfo.MetaData;
var licenseUrl = Book.GetLicenseMetadata().License.Url;
if (string.IsNullOrEmpty(licenseUrl))
licenseUrl = null; // allows us to use ?? below.
var metadataElt = new XElement(opf + "metadata",
new XAttribute(XNamespace.Xmlns + "dc", dcNamespace),
new XAttribute(XNamespace.Xmlns + "opf", opf.NamespaceName),
// attribute makes the namespace have a prefix, not be a default.
new XElement(dc + "title", Book.Title),
new XElement(dc + "language", Book.BookData.Language1.Iso639Code),
new XElement(dc + "identifier",
new XAttribute("id", "I" + Book.ID), "bloomlibrary.org." + Book.ID),
new XElement(dc + "source", source));
if (!string.IsNullOrEmpty(Book.BookInfo.Isbn))
{
var isbnContents = GetIsbnContents();
if (!string.IsNullOrEmpty(isbnContents))
metadataElt.Add(new XElement(dc + "identifier",
"urn:isbn:" + isbnContents));
}
if (!string.IsNullOrEmpty(bookMetaData.Author))
metadataElt.Add(new XElement(dc + "creator", new XAttribute("id", "author"), bookMetaData.Author));
if (!string.IsNullOrEmpty(bookMetaData.Summary))
metadataElt.Add(new XElement(dc + "description", bookMetaData.Summary));
// Per BL-6438 and a reply from the GDL (Global Digital Library), it is better to put
// this in the field than to leave it blank when there is no URL available that specifies
// the license. Unfortunately there is nowhere to put the RightsStatement that might
// indicate more generous permissions (or attempt to restrict what the CC URL indicates).
metadataElt.Add(new XElement(dc + "rights", licenseUrl ?? "All Rights Reserved"));
AddSubjects(metadataElt, dc, opf);
// Last modified datetime like 2012-03-20T11:37:00Z
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "dcterms:modified"), new FileInfo(Storage.FolderPath).LastWriteTimeUtc.ToString("s") + "Z"));
var (copyrightYear, copyrightHolder) = ParseCopyright(Book.BookInfo.Copyright);
if (!string.IsNullOrEmpty(copyrightYear))
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "dcterms:dateCopyrighted"), copyrightYear));
if (!string.IsNullOrEmpty(copyrightHolder))
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "dcterms:rightsHolder"), copyrightHolder));
if (!string.IsNullOrEmpty(bookMetaData.TypicalAgeRange))
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "schema:typicalAgeRange"), bookMetaData.TypicalAgeRange));
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "schema:numberOfPages"), Book.GetLastNumberedPageNumber().ToString(CultureInfo.InvariantCulture)));
// dcterms:educationLevel is the closest authorized value for property that I've found for ReadingLevelDescription
if (!string.IsNullOrEmpty(bookMetaData.ReadingLevelDescription))
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "dcterms:educationLevel"), bookMetaData.ReadingLevelDescription));
AddAccessibilityMetadata(metadataElt, opf, bookMetaData);
// Add epub 2.0 metadata for the cover image for the sake of WorldReader (see https://issues.bloomlibrary.org/youtrack/issue/BL-8639.)
var coverImage = Path.GetFileNameWithoutExtension(coverPageImageFile);
if (!string.IsNullOrEmpty(coverImage))
metadataElt.Add(new XElement("meta", new XAttribute("name", "cover"), new XAttribute("content", coverImage)));
rootElt.Add(metadataElt);
var manifestElt = new XElement(opf + "manifest");
rootElt.Add(manifestElt);
TimeSpan bookDuration = new TimeSpan();
foreach(var item in _manifestItems)
{
var mediaType = GetMediaType(item);
var idOfFile = GetIdOfFile(item);
var itemElt = new XElement(opf + "item",
new XAttribute("id", idOfFile),
new XAttribute("href", item),
new XAttribute("media-type", mediaType));
var properties = new StringBuilder();
if (_scriptedItems.Contains(item))
properties.Append("scripted");
if (_svgItems.Contains(item))
properties.Append(" svg");
// This isn't very useful but satisfies a validator requirement until we think of
// something better.
if (item == _navFileName)
properties.Append(" nav");
if (item == coverPageImageFile)
properties.Append(" cover-image");
var propertiesValue = properties.ToString().Trim();
if (propertiesValue.Length > 0)
itemElt.SetAttributeValue("properties", propertiesValue);
if(Path.GetExtension(item).ToLowerInvariant() == ".xhtml")
{
var overlay = GetOverlayName(item);
if(_manifestItems.Contains(overlay))
itemElt.SetAttributeValue("media-overlay", GetIdOfFile(overlay));
}
manifestElt.Add(itemElt);
if(mediaType == "application/smil+xml")
{
// need a metadata item giving duration (possibly only to satisfy Pagina validation,
// but that IS an objective).
TimeSpan itemDuration = _pageDurations[idOfFile];
bookDuration += itemDuration;
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "media:duration"),
new XAttribute("refines", "#" + idOfFile),
new XText(itemDuration.ToString())));
}
}
if(bookDuration.TotalMilliseconds > 0)
{
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "media:duration"),
new XText(bookDuration.ToString())));
metadataElt.Add(new XElement(opf + "meta",
new XAttribute("property", "media:active-class"),
new XText("-epub-media-overlay-active")));
}
MakeSpine(opf, rootElt, manifestPath);
}
private string GetIsbnContents()
{
string isbnContents;
try
{
isbnContents = XElement.Parse(Book.BookInfo.Isbn).GetInnerText();
}
catch (ArgumentException)
{
// apparently non-valid XML input; try just using what's given
isbnContents = Book.BookInfo.Isbn;
}
catch (XmlException)
{
// tests don't always wrap ISBN in XML like Bloom does
isbnContents = Book.BookInfo.Isbn;
}
return isbnContents;
}
private const string COPYRIGHT = "Copyright © ";
private static (string copyrightYear, string copyrightHolder) ParseCopyright(string copyrightString)
{
if (copyrightString == null || !copyrightString.StartsWith(COPYRIGHT))
return (null, null);
var stripped = copyrightString.Substring(COPYRIGHT.Length);
var commaIndex = stripped.IndexOf(","); // Put in by ClearShare; not localized.
if (commaIndex < 0)
return (null, null);
var rightsHolder = stripped.Substring(commaIndex + 1).Trim();
return (stripped.Substring(0, commaIndex), rightsHolder);
}
/// <summary>
/// Add the (possibly several) Thema subject code(s) to the metadata.
/// </summary>
/// <param name="metadataElt"></param>
/// <param name="dc"></param>
/// <param name="opf"></param>
private void AddSubjects(XElement metadataElt, XNamespace dc, XNamespace opf)
{
var subjects = Book.BookInfo.MetaData.Subjects;
if (subjects == null)
return;
var i = 1;
foreach (var subjectObj in subjects)
{
var id = string.Format("subject{0:00}", i);
var code = subjectObj.value;
var description = subjectObj.label;
Debug.Assert(!string.IsNullOrEmpty(code) && !string.IsNullOrEmpty(description),
"There has been a failure in the SubjectChooser code.");
metadataElt.Add(
new XElement(dc + "subject", new XAttribute("id", id), description),
new XElement(opf + "meta", new XAttribute("refines", "#"+id), new XAttribute("property", "epub32:authority"), "https://ns.editeur.org/thema/"),
new XElement(opf + "meta", new XAttribute("refines", "#"+id), new XAttribute("property", "epub32:term"), code)
);
++i;
}
}
/// <summary>
/// If the book has an ISBN we should use use that. Otherwise the source should contain
/// "as much information as possible about the source publication (e.g., the publisher,
/// date, edition, and binding)". Since it probably doesn't have a publisher if it lacks
/// an ISBN, let alone an edition, maybe all we can do is a date, something like
/// "created from Bloom book on *date*". Possibly noting the currently configured
/// page size is relevant. Possibly at some point we will have a metadata input screen
/// and we might put a version field in that and use it here.
/// </summary>
private string GetBookSource()
{
var isbnMulti = Book.GetDataItem("ISBN");
if (!MultiTextBase.IsEmpty(isbnMulti))
{
var isbn = isbnMulti.GetBestAlternative("*");
if (!String.IsNullOrEmpty(isbn))
return "urn:isbn:" + isbn;
}
var layout = Book.GetLayout();
var pageSize = layout.SizeAndOrientation.PageSizeName + (layout.SizeAndOrientation.IsLandScape ? " Landscape" : " Portrait");
var date = DateTime.Now.ToString("yyyy-MM-dd");
return String.Format("created from Bloom book on {0} with page size {1}", date, pageSize);
}
/// <summary>
/// Add accessibility related metadata elements.
/// </summary>
/// <remarks>
/// See https://silbloom.myjetbrains.com/youtrack/issue/BL-5895 and http://www.idpf.org/epub/a11y/techniques/#meta-003.
/// https://www.w3.org/wiki/WebSchemas/Accessibility is also helpful.
/// https://github.com/daisy/epub-revision-a11y/wiki/ePub-3.1-Accessibility--Proposal-To-Schema.org is also helpful, but
/// I think the final version went for multiple <meta accessMode="..."> elements instead of lumping the attribute
/// values together in one element.
/// </remarks>
private void AddAccessibilityMetadata(XElement metadataElt, XNamespace opf, BookMetaData metadata)
{
var hasImages = Book.HasImages();
var hasVideo = Book.HasVideos();
var hasFullAudio = Book.HasFullAudioCoverage();
var hasAudio = Book.HasAudio(); // Check whether the book references any audio files that actually exist.
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessMode"), "textual"));
if (hasImages)
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessMode"), "visual"));
if (hasAudio)
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessMode"), "auditory"));
// Including everything like this is probably the best we can do programmatically without author input.
// This assumes that images are neither essential nor sufficient.
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessModeSufficient"), "textual"));
if (hasImages || hasVideo)
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessModeSufficient"), "textual,visual"));
if (hasAudio)
{
if (hasFullAudio)
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessModeSufficient"), "auditory"));
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessModeSufficient"), "textual,auditory"));
}
if ((hasImages || hasVideo) && hasAudio)
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessModeSufficient"), "textual,visual,auditory"));
if (hasAudio) // REVIEW: should this be hasFullAudio?
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "synchronizedAudioText"));
// Note: largePrint description says "The property is not set if the font size can be increased. See displayTransformability."
// https://www.w3.org/wiki/WebSchemas/Accessibility does not list resizeText as a possible modifier for displayTransformability,
// and the 3.2 ACE by DAISY checker objects, so I have removed it. A blanket statement that the reader may change things seems fine.
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "displayTransformability"));
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "printPageNumbers"));
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "unlocked"));
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "readingOrder"));
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "tableOfContents"));
if (!string.IsNullOrEmpty(metadata.A11yFeatures))
{
if(metadata.A11yFeatures.Contains("signLanguage"))
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "signLanguage"));
if (metadata.A11yFeatures.Contains("alternativeText"))
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityFeature"), "alternativeText"));
}
// See http://www.idpf.org/epub/a11y/accessibility.html#sec-conf-reporting for the next two elements.
if (!string.IsNullOrEmpty(metadata.A11yLevel))
{
metadataElt.Add(new XElement(opf + "link", new XAttribute("rel", "dcterms:conformsTo"),
new XAttribute("href", "http://www.idpf.org/epub/a11y/accessibility-20170105.html#" + metadata.A11yLevel)));
}
if (!string.IsNullOrEmpty(metadata.A11yCertifier))
{
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "a11y:certifiedBy"), metadata.A11yCertifier));
}
// Hazards section -- entirely 'manual' based on user entry (or lack thereof) in the dialog
if (!string.IsNullOrEmpty(metadata.Hazards))
{
var hazards = metadata.Hazards.Split(',');
// "none" is recommended instead of listing all 3 noXXXHazard values separately.
// But since we don't know anything about sound, we can't use it. (BL-6947)
foreach (var hazard in hazards)
{
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityHazard"), hazard));
}
}
else
{
// report that we don't know anything.
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilityHazard"), "unknown"));
}
metadataElt.Add(new XElement(opf + "meta", new XAttribute("property", "schema:accessibilitySummary"),
"How well the accessibility features work is up to the individual author.")); // What else to say? not sure localization is possible.
}
/// <summary>
/// Create an audio overlay for the page if appropriate.
/// We are looking for the page to contain spans with IDs. For each such ID X,
/// we look for a file _storage.FolderPath/audio/X.mp{3,4}.
/// If we find at least one such file, we create pageDocName_overlay.smil
/// with appropriate contents to tell the reader how to read all such spans
/// aloud.
/// </summary>
/// <param name="pageDom"></param>
/// <param name="pageDocName"></param>
private void AddAudioOverlay(HtmlDom pageDom, string pageDocName)
{
// These elements are marked as audio-sentence but we're not sure yet if the user actually recorded them yet
var audioSentenceElements = HtmlDom.SelectAudioSentenceElements(pageDom.RawDom.DocumentElement).Cast<XmlElement>();
// Now check if the audio recordings actually exist for them
var audioSentenceElementsWithRecordedAudio =
audioSentenceElements.Where(
x => AudioProcessor.GetOrCreateCompressedAudio(Storage.FolderPath, x.Attributes["id"].Value) != null);
if(!audioSentenceElementsWithRecordedAudio.Any())
return;
var overlayName = GetOverlayName(pageDocName);
_manifestItems.Add(overlayName);
string smilNamespace = "http://www.w3.org/ns/SMIL";
XNamespace smil = smilNamespace;
XNamespace epub = kEpubNamespace;
var seq = new XElement(smil + "seq",
new XAttribute("id", "id1"), // all <seq> I've seen have this, not sure whether necessary
new XAttribute(epub + "textref", pageDocName),
new XAttribute(epub + "type", "bodymatter chapter") // only type I've encountered
);
var root = new XElement(smil + "smil",
new XAttribute("xmlns", smilNamespace),
new XAttribute(XNamespace.Xmlns + "epub", kEpubNamespace),
new XAttribute("version", "3.0"),
new XElement(smil + "body",
seq));
int index = 1;
TimeSpan pageDuration = new TimeSpan();
string mergedAudioPath = null;
if (OneAudioPerPage && audioSentenceElementsWithRecordedAudio.Count() > 1)
mergedAudioPath = MergeAudioElements(audioSentenceElementsWithRecordedAudio);
foreach(var audioSentenceElement in audioSentenceElementsWithRecordedAudio)
{
// These are going to be the same regardless of whether this audio sentence has sub-elements to highlight.
var audioId = audioSentenceElement.Attributes["id"].Value;
var path = AudioProcessor.GetOrCreateCompressedAudio(Storage.FolderPath, audioId);
string epubPath = mergedAudioPath ?? CopyFileToEpub(path, subfolder: kAudioFolder);
var newSrc = epubPath.Substring(_contentFolder.Length + 1).Replace('\\', '/');
var highlightSegments = audioSentenceElement.SelectNodes(".//*[contains(concat(' ', normalize-space(@class), ' '),' bloom-highlightSegment ')]");
if (highlightSegments.Count == 0)
{
// Traditional approach, no sub-elements.
var dataDurationAttr = audioSentenceElement.Attributes["data-duration"];
TimeSpan clipTimeSpan;
if(dataDurationAttr != null)
{
// Make sure we parse "3.14159" properly since that's the form we'll see regardless of current locale.
// (See http://issues.bloomlibrary.org/youtrack/issue/BL-4374.)
clipTimeSpan = TimeSpan.FromSeconds(Double.Parse(dataDurationAttr.Value, System.Globalization.CultureInfo.InvariantCulture));
}
else
{
try
{
#if __MonoCS__
// ffmpeg can provide the length of the audio, but you have to strip it out of the command line output
// See https://stackoverflow.com/a/33115316/7442826 or https://stackoverflow.com/a/53648234/7442826
// The output (which is sent to stderr, not stdout) looks something like this:
// "size=N/A time=00:03:36.13 bitrate=N/A speed= 432x \rsize=N/A time=00:07:13.16 bitrate=N/A speed= 433x \rsize=N/A time=00:08:42.97 bitrate=N/A speed= 434x"
// When seen on the console screen interactively, it looks like a single line that is updated frequently.
// A short file may have only one carriage-return separated section of output, while a very long file may
// have more sections than this.
var args = String.Format("-v quiet -stats -i \"{0}\" -f null -", path);
var result = CommandLineRunner.Run("/usr/bin/ffmpeg", args, "", 20 * 10, new SIL.Progress.NullProgress());
var output = result.ExitCode == 0 ? result.StandardError : null;
string timeString = null;
if (!string.IsNullOrEmpty(output))
{
var idxTime = output.LastIndexOf("time=");
if (idxTime > 0)
timeString = output.Substring(idxTime + 5, 11);
}
clipTimeSpan = TimeSpan.Parse(timeString, CultureInfo.InvariantCulture);
#else
using (var reader = new Mp3FileReader(path))
clipTimeSpan = reader.TotalTime;
#endif
}
catch
{
NonFatalProblem.Report(ModalIf.All, PassiveIf.All,
"Bloom could not accurately determine the length of the audio file and will only make a very rough estimate.");
// Crude estimate. In one sample, a 61K mp3 is 7s long.
// So, multiply by 7 and divide by 61K to get seconds.
// Then, to make a TimeSpan we need ticks, which are 0.1 microseconds,
// hence the 10000000.
clipTimeSpan = new TimeSpan(new FileInfo(path).Length * 7 * 10000000 / 61000);
}
}
// Determine start time based on whether we have oneAudioPerPage (implies that we need to merge all the aduio files into one big file) or not
TimeSpan clipStart = mergedAudioPath != null ? pageDuration : new TimeSpan(0);
TimeSpan clipEnd = clipStart + clipTimeSpan;
pageDuration += clipTimeSpan;
AddEpubAudioParagraph(seq, smil, ref index, pageDocName, audioId, newSrc, clipStart, clipEnd);
}
else
{
// We have some subelements to worry about.
string timingsStr = audioSentenceElement.GetAttribute("data-audiorecordingendtimes"); // These should be in seconds
if (String.IsNullOrEmpty(timingsStr))
timingsStr = audioSentenceElement.GetAttribute("data-duration"); // audio hasn't been split (https://issues.bloomlibrary.org/youtrack/issue/BL-9370)
string[] timingFields = timingsStr.Split(' ');
var segmentEndTimesSecs = new List<float>(timingFields.Length);
foreach (var timing in timingFields)
{
if (!float.TryParse(timing, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out var time))
{
time = float.NaN;
}
segmentEndTimesSecs.Add(time);
}
// Keeps track of the duration of the current element including all sub-elements, but not any earlier elements on the page)
// (In contrast with the page duration, which does include all earlier elements)
TimeSpan currentElementDuration = new TimeSpan();
double previousEndTimeSecs = 0;
for (int i = 0; i < highlightSegments.Count && i < segmentEndTimesSecs.Count; ++i)
{
float clipEndTimeSecs = segmentEndTimesSecs[i];
if (float.IsNaN(clipEndTimeSecs))
{
// Don't know how long this clip is -> don't know how long to highlight for -> just skip this segment and go to the next one.
continue;
}
if (clipEndTimeSecs <= previousEndTimeSecs)
{
// Duration <= 0.0 signals an error in the automatic splitting by aeneas.
// Passing it through results in an invalid ePUB, without improving audio playback.
// See https://issues.bloomlibrary.org/youtrack/issue/BL-9428.
continue;
}
double clipDurationSecs = clipEndTimeSecs - previousEndTimeSecs;
previousEndTimeSecs = clipEndTimeSecs;
TimeSpan clipTimeSpan = TimeSpan.FromSeconds(clipDurationSecs);
var segment = highlightSegments[i];
// The segmentId may be missing if the user records by textbox but neglects to split the audio.
// This can easily happen, especially with textboxes that contain only one sentence or phrase.
// See https://issues.bloomlibrary.org/youtrack/issue/BL-9370.
string segmentId = segment.GetOptionalStringAttribute("id", null);
if (String.IsNullOrEmpty(segmentId))
{
// simply giving an id value is good enough for Readium to play the sound.
segmentId = Guid.NewGuid().ToString();
var first = segmentId[0];
if (first >= '0' && first <= '9')
segmentId = "i" + segmentId;
}
// Determine start time based on whether we have oneAudioPerPage (implies that we need to merge all the aduio files into one big file) or not
TimeSpan clipStart = (mergedAudioPath != null) ? pageDuration + currentElementDuration : currentElementDuration;
TimeSpan clipEnd = clipStart + clipTimeSpan;
currentElementDuration += clipTimeSpan;
AddEpubAudioParagraph(seq, smil, ref index, pageDocName, segmentId, newSrc, clipStart, clipEnd);
}
pageDuration += currentElementDuration;
}
}
_pageDurations[GetIdOfFile(overlayName)] = pageDuration;
var overlayPath = Path.Combine(_contentFolder, overlayName);
using(var writer = XmlWriter.Create(overlayPath))
root.WriteTo(writer);
}
/// <summary>
/// Adds a narrated piece of text into an overlay sequence
/// </summary>
/// <param name="seq">The element to add to</param>
/// <param name="smil">The namespace</param>
/// <param name="index">Pass by Reference. The 1-based index of the element. This function will increment it after adding the new element</param>
/// <param name="pageDocName">The name of the page, e.g. 1.xhtml, which will be used as the filename of a URL</param>
/// <param name="segmentId">The ID (as in the ID used in the Named Anchor fragment of a URL) of the TEXT to be highlighted (as opposed to the ID of the audio to be played)</param>
/// <param name="newSrc">The source of the AUDIO file</param>
/// <param name="clipStartSecs">The start time (in seconds) of this segment within the audio file</param>
/// <param name="clipEndSecs">The end time (in seconds) of this segment within the audio file</param>
private void AddEpubAudioParagraph(XElement seq, XNamespace smil, ref int index, string pageDocName, string segmentId, string newSrc, TimeSpan clipStartSecs, TimeSpan clipEndSecs)
{
seq.Add(new XElement(smil + "par",
new XAttribute("id", "s" + index++),
new XElement(smil + "text",
new XAttribute("src", pageDocName + "#" + segmentId)),
new XElement(smil + "audio",
new XAttribute("src", newSrc),
new XAttribute("clipBegin", clipStartSecs.ToString(@"h\:mm\:ss\.fff")),
new XAttribute("clipEnd", clipEndSecs.ToString(@"h\:mm\:ss\.fff")))));
}
/// <summary>
/// Merge the audio files corresponding to the specified elements. Returns the path to the merged MP3 if all is well, null if
/// we somehow failed to merge.
/// </summary>
private string MergeAudioElements(IEnumerable<XmlElement> elementsWithAudio)
{
var mergeFiles =
elementsWithAudio
.Select(s => AudioProcessor.GetOrCreateCompressedAudio(Storage.FolderPath, s.Attributes["id"]?.Value))
.Where(s => !string.IsNullOrEmpty(s));
Directory.CreateDirectory(Path.Combine(_contentFolder, kAudioFolder));
var combinedAudioPath = Path.Combine(_contentFolder, kAudioFolder, "page" + _pageIndex + ".mp3");
var errorMessage = AudioProcessor.MergeAudioFiles(mergeFiles, combinedAudioPath);
if (errorMessage == null)
{
_manifestItems.Add(kAudioFolder + "/" + Path.GetFileName(combinedAudioPath));
return combinedAudioPath;
}
Logger.WriteEvent("Failed to merge audio files for page " + _pageIndex + " " + errorMessage);
// and we will do it the old way. Works for some readers.
return null;
}
private static string GetOverlayName(string pageDocName)
{
return Path.ChangeExtension(Path.GetFileNameWithoutExtension(pageDocName) + "_overlay", "smil");
}
private void MakeSpine(XNamespace opf, XElement rootElt, string manifestPath)
{
// Generate the spine, which indicates the top-level readable content in order.
// These IDs must match the corresponding ones in the manifest, since the spine
// doesn't indicate where to actually find the content.
var spineElt = new XElement(opf + "spine");
if(this.Book.BookData.Language1.IsRightToLeft)
{
spineElt.SetAttributeValue("page-progression-direction","rtl");
}
rootElt.Add(spineElt);
foreach(var item in _spineItems)
{
var itemElt = new XElement(opf + "itemref",
new XAttribute("idref", GetIdOfFile(item)));
spineElt.Add(itemElt);
if (_nonLinearSpineItems.Contains(item))
itemElt.SetAttributeValue("linear", "no");
}
var sb = new StringBuilder();
var xws = new XmlWriterSettings();
xws.Indent = true; // much easier to read if humans ever look at it, not that much more disk space.
using (XmlWriter writer = XmlWriter.Create(sb, xws))
rootElt.WriteTo(writer);
// We need to remove the empty xmlns="" that gets stuck on the bare meta element added for the epub 2.0 cover image metadata.
// We also need to change the encoding from utf-16 to utf-8 for the xml document.
// (Setting xws.Encoding might or might not work on Windows, but doesn't on Linux.)
RobustFile.WriteAllText(manifestPath, sb.ToString().Replace(" xmlns=\"\"","").Replace(" encoding=\"utf-16\"?>"," encoding=\"utf-8\"?>"), Encoding.UTF8);
}
Dictionary<string, string> _directionSettings = new Dictionary<string, string>();
private bool _abortRequested;
private void CopyStyleSheets(HtmlDom pageDom)
{
foreach(XmlElement link in pageDom.SafeSelectNodes("//link[@rel='stylesheet']"))
{
var href = Path.Combine(Book.FolderPath, link.GetAttribute("href"));
var name = Path.GetFileName(href);
if(name == "fonts.css")
continue; // generated file for this book, already copied to output.
string path;
if (name == "customCollectionStyles.css" || name == "defaultLangStyles.css")
{
// These files should be in the book's folder, not in some arbitrary place in our search path.
path = Path.Combine(_originalBook.FolderPath, name);
// It's OK not to find these.
if (!File.Exists(path))
{
continue;
}
else if (name == "defaultLangStyles.css")
{
ProcessSettingsForTextDirectionality(path);
}
}
else
{
var fl = Storage.GetFileLocator();
path = fl.LocateFileWithThrow(name);
}
CopyFileToEpub(path, subfolder:kCssFolder);
}
}
private void ProcessSettingsForTextDirectionality(string path)
{
// We have to deal with the direction: settings since EPUB doesn't like them.
// See https://issues.bloomlibrary.org/youtrack/issue/BL-6705.
_directionSettings.Clear();
// REVIEW: is BODY always ltr, or should it be the same as Language1? Having BODY be ltr for a book in Arabic or Hebrew
// seems counterintuitive even if all the div elements are marked correctly.
_directionSettings.Add("body", this.Book.BookData.Language1.IsRightToLeft ? "rtl" : "ltr");
foreach (var lang in this.Book.BookData.GetBasicBookLanguages())
{
_directionSettings.Add(lang.Iso639Code, lang.IsRightToLeft ? "rtl" : "ltr");
}
}
private void SetDirAttributes(HtmlDom pageDom)
{
string bodyDir;
if (!_directionSettings.TryGetValue("body", out bodyDir))
return;
bodyDir = bodyDir.ToLowerInvariant();
foreach (XmlElement body in pageDom.SafeSelectNodes("//body"))
{
body.SetAttribute ("dir", bodyDir);
break; // only one body element anyway
}
var allSame = true;
foreach (var dir in _directionSettings.Values)
{
if (dir != bodyDir)
{
allSame = false;
break;
}
}
if (allSame)
return;
foreach (var key in _directionSettings.Keys)
{
if (key == "body")
continue;
var dir = _directionSettings[key];
foreach (XmlElement div in pageDom.SafeSelectNodes("//div[@lang='"+key+"']"))
div.SetAttribute("dir", dir);
}
}
/// <summary>
/// If the page is not blank, make the page file.
/// If the page is blank, return without writing anything to disk.
/// </summary>
/// <remarks>
/// See http://issues.bloomlibrary.org/youtrack/issue/BL-4288 for discussion of blank pages.
/// </remarks>
private bool MakePageFile(XmlElement pageElement, ISet<string> warningMessages)
{
// nonprinting pages (e.g., old-style comprehension questions) are omitted for now
// interactive pages (e.g., new-style quiz pages) are also omitted. We're drastically
// simplifying the layout of epub pages, and omitting most style sheets, and not including
// javascript, so even if the player supports all those things perfectly, they're not likely
// to work properly.
if ((pageElement.Attributes["class"]?.Value?.Contains("bloom-nonprinting") ?? false)
|| (pageElement.Attributes["class"]?.Value?.Contains("bloom-interactive-page") ?? false))
{
PublishHelper.CollectPageLabel(pageElement, _omittedPageLabels);
return false;
}
var pageDom = GetEpubFriendlyHtmlDomForPage(pageElement);
// Note, the following stylesheet stuff can be quite bewildering...
// Testing shows that these stylesheets are not actually used
// in PublishHelper.RemoveUnwantedContent(), which falls back to the stylesheets in place for the book, which in turn,
// in unit tests, is backed by a simple mocked BookStorage which doesn't have the stylesheet smarts. Sigh.
pageDom.RemoveModeStyleSheets();
if (Unpaginated)
{
// Do not add any stylesheets that are not originally written specifically for ePUB use.
// See https://issues.bloomlibrary.org/youtrack/issue/BL-5495.
RemoveRegularStylesheets(pageDom);
pageDom.AddStyleSheet(Storage.GetFileLocator().LocateFileWithThrow(@"baseEPUB.css").ToLocalhost());
var brandingPath = Storage.GetFileLocator().LocateOptionalFile(@"branding.css");
if (!string.IsNullOrEmpty(brandingPath))
{
pageDom.AddStyleSheet(brandingPath.ToLocalhost());
}
}
else
{
// Review: this branch is not currently used. Very likely we need SOME different stylesheets
// from the printed book, possibly including baseEPUB.css, if it's even possible to make
// useful fixed-layout books out of Bloom books that will work with current readers.
pageDom.AddStyleSheet(Storage.GetFileLocator().LocateFileWithThrow(@"basePage.css").ToLocalhost());
pageDom.AddStyleSheet(Storage.GetFileLocator().LocateFileWithThrow(@"previewMode.css"));
pageDom.AddStyleSheet(Storage.GetFileLocator().LocateFileWithThrow(@"origami.css"));
}
// Remove stuff that we don't want displayed. Some e-readers don't obey display:none. Also, not shipping it saves space.
_publishHelper.RemoveUnwantedContent(pageDom, this.Book, true, warningMessages, this);
_fontsUsedInBook.UnionWith(_publishHelper.FontsUsed); // filled in as side-effect of removing unwanted content
pageDom.SortStyleSheetLinks();
pageDom.AddPublishClassToBody("epub");
// add things like data-bookshelfurlkey="Kyrgyzstan-grade3", which can be used by stylesheets to vary appearance
foreach (var attr in _book.OurHtmlDom.GetBodyAttributesThatMayAffectDisplay())
{
pageDom.Body.SetAttribute(attr.Name, attr.Value);
}
if (RemoveFontSizes)
{
DoRemoveFontSizes(pageDom);
}
MakeCssLinksAppropriateForEpub(pageDom);
RemoveBloomUiElements(pageDom);
RemoveSpuriousLinks(pageDom);
RemoveScripts(pageDom);
RemoveUnwantedAttributes(pageDom);
FixIllegalIds(pageDom);
FixPictureSizes(pageDom);
// Check for a blank page before storing any data from this page or copying any files on disk.
if (IsBlankPage(pageDom.RawDom.DocumentElement))
return false;
// Do this as the last cleanup step, since other things may be looking for these elements
// expecting them to be divs.
ConvertHeadingStylesToHeadingElements(pageDom);
// Since we only allow one htm file in a book folder, I don't think there is any
// way this name can clash with anything else.
++_pageIndex;
var pageDocName = _pageIndex + ".xhtml";
string preferedPageName;
if (_desiredNameMap.TryGetValue(pageElement, out preferedPageName))
pageDocName = preferedPageName;
CopyImages(pageDom);
CopyVideos(pageDom);
AddEpubNamespace(pageDom);
AddPageBreakSpan(pageDom, pageDocName);
AddEpubTypeAttributes(pageDom);
AddAriaAccessibilityMarkup(pageDom);
CheckForEpubProperties(pageDom, pageDocName);
_manifestItems.Add(pageDocName);
_spineItems.Add(pageDocName);
if(!PublishWithoutAudio)
AddAudioOverlay(pageDom, pageDocName);
StoreTableOfContentInfo(pageElement, pageDocName);
// for now, at least, all Bloom book pages currently have the same stylesheets, so we only neeed
//to copy those stylesheets on the first page
if (_pageIndex == 1)
CopyStyleSheets(pageDom);
// But we always need to adjust the stylesheets to be in the css folder
foreach(XmlElement link in pageDom.SafeSelectNodes("//link[@rel='stylesheet']"))
{
var name = Path.GetFileName(link.GetAttribute("href"));
link.SetAttribute("href", kCssFolder+"/" + name);
}
pageDom.AddStyleSheet(kCssFolder+"/" + "fonts.css"); // enhance: could omit if we don't embed any
// EPUB doesn't like direction: settings in CSS, so we need to explicitly set dir= attributes.
if (_directionSettings.Count > 0)
SetDirAttributes(pageDom);
// ePUB validator requires HTML to use namespace. Do this last to avoid (possibly?) messing up our xpaths.
pageDom.RawDom.DocumentElement.SetAttribute("xmlns", "http://www.w3.org/1999/xhtml");
RobustFile.WriteAllText(Path.Combine(_contentFolder, pageDocName), pageDom.RawDom.OuterXml);
List<Tuple<XmlElement, string>> pendingBackLinks;
if (_pendingBackLinks.TryGetValue(pageElement, out pendingBackLinks))
{
foreach (var pendingBackLink in pendingBackLinks)
pendingBackLink.Item1.SetAttribute("href", pageDocName + "#" + pendingBackLink.Item2);
}
return true;
}
/// <summary>
/// Store the table of content information (if any) for this page.
/// </summary>
/// <param name="pageElement">a <div> with a class attribute that contains page level formatting information</param>
/// <param name="pageDocName">filename of the page's html file</param>
private void StoreTableOfContentInfo(XmlElement pageElement, string pageDocName)
{
var pageClasses = pageElement.GetAttribute("class").Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
string pageLabel = null;
if (pageClasses.Contains("bloom-frontMatter") || pageClasses.Contains ("bloom-backMatter"))
{
pageLabel = GetXMatterPageName(pageClasses);
}
else if (_firstContentPageItem == null)
{
// Record the first non-blank page that isn't front-matter as the first content page.
_firstContentPageItem = pageDocName;
string languageIdUsed;
pageLabel = LocalizationManager.GetString("PublishTab.Epub.PageLabel.Content", "Content", "label for the book content in the ePUB's Table of Contents",
_langsForLocalization, out languageIdUsed);
}
if (!String.IsNullOrEmpty(pageLabel))
_tocList.Add(String.Format("<li><a href=\"{0}\">{1}</a></li>", pageDocName, pageLabel));
}
private void ConvertHeadingStylesToHeadingElements(HtmlDom pageDom)
{
foreach (var div in pageDom.SafeSelectNodes(".//div[contains(@class, 'Heading')]").Cast<XmlElement>().ToArray())
{
var classes = div.Attributes["class"].Value;
var regex = new Regex(@"\bHeading([0-9])\b");
var match = regex.Match(classes);
if (!match.Success)
continue; // not a precisely matching class
var level = match.Groups[1]; // the number
var tag = "h" + level;
var replacement = div.OwnerDocument.CreateElement(tag);
foreach (var attr in div.Attributes.Cast<XmlAttribute>().ToArray())
{
replacement.Attributes.Append(attr);
}
var paragraphSeen = false;
foreach (var child in div.ChildNodes.Cast<XmlNode>().ToArray())
{
// paragraph elements are not valid inside heading elements, so we need to
// remove any paragraph markup by copying only the content, not the markup
if (child.Name == "p")
{
// If there are multiple paragraphs, the paragraph breaks disappear with
// the paragraph markup, so insert line breaks instead.
if (paragraphSeen)
replacement.AppendChild(div.OwnerDocument.CreateElement("br"));
foreach (var grandchild in child.ChildNodes.Cast<XmlNode>().ToArray())
replacement.AppendChild(grandchild);
paragraphSeen = true;
}
else
{
replacement.AppendChild(child);
}
}
div.ParentNode.ReplaceChild(replacement, div);
}
}
private void DoRemoveFontSizes(HtmlDom pageDom)
{
// Find the special styles element which contains the user-defined styles.
// These are the only elements I can find that set explicit font sizes.
// A few of our css rules apply percentage sizes, but that should be OK.
var userStyles = pageDom.Head.ChildNodes.Cast<XmlNode>()
.Where(x => x is XmlElement && x.Attributes["title"]?.Value == "userModifiedStyles").FirstOrDefault();
if (userStyles != null)
{
var userStylesCData = userStyles.ChildNodes.Cast<XmlNode>().Where(x => x is XmlCDataSection).FirstOrDefault();
if (userStylesCData != null)
{
var regex = new Regex(@"font-size\s*:[^;}]*;?");
userStylesCData.InnerText = regex.Replace(userStylesCData.InnerText, "").Replace(" ", " ");
}
}
}
public static bool IsBranding(XmlElement element)
{
if (element == null)
{
return false;
}
if (PublishHelper.HasClass(element, "branding"))
{
return true;
}
// For example: <div data-book="credits-page-branding-bottom-html" lang="*"></div>
while (element != null)
{
string value = element.GetAttribute("data-book");
if (value.Contains("branding"))
{
return true;
}
else
{
XmlNode parentNode = element.ParentNode; // Might be an XmlDocument up the chain
if (parentNode is XmlElement)
{
element = (XmlElement)parentNode;
}
else
{
break;
}
}
}
return false;
}
// This method is called by reflection in some tests
private void HandleImageDescriptions(HtmlDom bookDom)
{
// Set img alt attributes to the description, or erase them if no description (BL-6035)
foreach (var img in bookDom.Body.SelectNodes("//img[@src]").Cast<XmlElement> ())
{
bool isLicense = PublishHelper.HasClass(img, "licenseImage");
bool isBranding = IsBranding(img);
if (isLicense || isBranding)
{
string newAltText = "";
if (isLicense)
{
newAltText = "Image representing the license of this book";
}
else if (isBranding)
{
// Check if it's using the placeholder alt text... which isn't actually meaningful and we don't want in the ePub version for accessibility.
string currentAltText = img.GetAttribute("alt");
if (!HtmlDom.IsPlaceholderImageAltText(img))
{
// It is using a custom-specified one. Go ahead and keep it.
newAltText = currentAltText;
}
else
{
// Placeholder or missing alt text. Replace it with the ePub version of the placeholder alt text
newAltText = "Logo of the book sponsors"; // Alternatively, it's OK to also put in "" to signal no accessibility need
}
}
img.SetAttribute("alt", newAltText);
img.SetAttribute("role", "presentation"); // tells accessibility tools to ignore it and makes DAISY checker happy
continue;
}
if ((img.ParentNode as XmlElement).GetAttribute("aria-hidden") == "true")
{
img.SetAttribute("role", "presentation"); // may not be needed, but doesn't hurt anything.
continue;
}
var desc = img.SelectSingleNode("following-sibling::div[contains(@class, 'bloom-imageDescription')]/div[contains(@class, 'bloom-content1')]") as XmlElement;
var text = desc?.InnerText.Trim();
if (!string.IsNullOrEmpty(text))
{
img.SetAttribute("alt", text);
continue;
}
img.RemoveAttribute("alt"); // signal missing accessibility information
}
// Put the image descriptions on the page following the images.
if (PublishImageDescriptions == BookInfo.HowToPublishImageDescriptions.OnPage)
{
var imageDescriptions = bookDom.SafeSelectNodes("//div[contains(@class, 'bloom-imageDescription')]");
foreach (XmlElement description in imageDescriptions)
{
var activeDescriptions = description.SafeSelectNodes("div[contains(@class, 'bloom-visibility-code-on')]");
if (activeDescriptions.Count == 0)
continue;
// Now that we need multiple asides (BL-6314), I'm putting them in a separate div.
// Insert the div after the image container, thus not interfering with the
// reader's placement of the image itself.
var asideContainer = description.OwnerDocument.CreateElement("div");
asideContainer.SetAttribute("class", "asideContainer");
description.ParentNode.ParentNode.InsertAfter(asideContainer, description.ParentNode);
foreach (XmlNode activeDescription in activeDescriptions)
{
// If the inner xml is only an audioSentence recording, it will still create the aside.
// But if there really isn't anything here, skip it.
if (string.IsNullOrWhiteSpace(activeDescription?.InnerXml))
continue;
var aside = description.OwnerDocument.CreateElement("aside");
// We want to preserve all the inner markup, especially the audio spans.
aside.InnerXml = activeDescription.InnerXml;
// We also need the language attribute to get the style to work right.
var langAttr = activeDescription.Attributes["lang"];
if (langAttr != null)
{
aside.SetAttribute("lang", langAttr.Value);
}
// As well as potentially being used by stylesheets, 'imageDescription' is used by the
// AddAriaAccessibilityMarkup to identify the aside as an image description
// (and tie the image to it). 'ImageDescriptionEdit-style' works with the 'lang' attribute
// to style the aside in the ePUB.
aside.SetAttribute("class", "imageDescription ImageDescriptionEdit-style");
// If the aside contains a TextBox mode recording, we need to maintain a div with the recording
// data attributes inside the aside element. See https://issues.bloomlibrary.org/youtrack/issue/BL-7805.
// Note that if the recording hasn't been split, the data-audiorecordingendtimes attribute will not exist
// and the sentences won't be marked with the bloom-highlightSegment class.
if (activeDescription.GetOptionalStringAttribute("data-audiorecordingmode", null) == "TextBox" &&
activeDescription.GetStringAttribute("class").Contains("audio-sentence"))
{
var duration = activeDescription.GetOptionalStringAttribute("data-duration", null);
var audioId = activeDescription.GetOptionalStringAttribute("id", null);
// If we don't have the id and data-duration values, playback won't work in the epub,
// and we may as well leave the current aside (which contains the text) alone.
if (!String.IsNullOrEmpty(duration) && !String.IsNullOrEmpty(audioId))
{
aside.InnerXml = "";
var divAudio = description.OwnerDocument.CreateElement("div");
divAudio.InnerXml = activeDescription.InnerXml;
divAudio.SetAttribute("class", "audio-sentence");
divAudio.SetAttribute("data-audiorecordingmode", "TextBox");
var endTimes = activeDescription.GetOptionalStringAttribute("data-audiorecordingendtimes", null);
if (!String.IsNullOrEmpty(endTimes))
divAudio.SetAttribute("data-audiorecordingendtimes", endTimes);
divAudio.SetAttribute("data-duration", duration);
divAudio.SetAttribute("id", audioId);
aside.AppendChild(divAudio);
}
}
asideContainer.AppendChild(aside);
}
// Delete the original image description since its content has been copied into the aside we
// just made, and even if we keep it hidden, the player may play the audio for both. (BL-7308)
description.ParentNode.RemoveChild(description);
}
}
// code to handle HowToPublishImageDescriptions.Links was removed from Bloom 4.6 on June 28, 2019.
// If HowToPublishImageDescriptions.None, leave alone, and they will be invisible, but not deleted.
// This allows the image description audio to play even when the description isn't displayed in
// written form (BL-7237). (For broken readers, the text might still be visible, but then it's
// likely the audio wouldn't play anyway.)
}
/// <summary>
/// Check whether this page will actually display anything. Although paper books allow blank pages
/// without confusing readers, ePUB books should not have blank pages.
/// </summary>
/// <remarks>
/// See http://issues.bloomlibrary.org/youtrack/issue/BL-4288.
/// Note that this method is called after RemoveUnwantedContent(), RemoveBloomUiElements(),
/// RemoveSpuriousLinks(), and RemoveScripts() have all been called.
/// </remarks>
private bool IsBlankPage(XmlElement pageElement)
{
foreach (XmlElement body in pageElement.GetElementsByTagName("body"))
{
// This may not be fool proof, but it works okay on an empty basic book. It also works on a test
// book with an empty page in the middle of the book, and on the two sample shell books shipped
// with Bloom.
if (!String.IsNullOrWhiteSpace(body.InnerText))
return false;
break; // There should be only one body element.
}
// Any real image will be displayed. Image only pages are allowed in Bloom.
// (This includes background images.)
foreach(XmlElement img in HtmlDom.SelectChildImgAndBackgroundImageElements(pageElement))
{
bool isBrandingFile; // not used here, but part of method signature
var path = FindRealImageFileIfPossible(img, out isBrandingFile);
if (!String.IsNullOrEmpty(path) && Path.GetFileName(path) != "placeHolder.png") // consider blank if only placeholder image
return false;
}
foreach (XmlElement vid in HtmlDom.SelectChildVideoElements(pageElement).Cast<XmlElement>())
{
var src = FindVideoFileIfPossible(vid);
if (!String.IsNullOrEmpty(src))
{
var srcPath = Path.Combine(Book.FolderPath, src);
if (RobustFile.Exists(srcPath))
return false;
}
}
return true;
}
private void CopyImages(HtmlDom pageDom)
{
// Manifest has to include all referenced files
foreach(XmlElement img in HtmlDom.SelectChildImgAndBackgroundImageElements(pageDom.RawDom.DocumentElement))
{
bool isBrandingFile;
var srcPath = FindRealImageFileIfPossible(img, out isBrandingFile);
if (srcPath == null)
continue; // REVIEW: should we remove the element since the image source is empty?
if (srcPath == String.Empty)
{
img.ParentNode.RemoveChild(img); // the image source file can't be found.
}
else
{
var isCoverImage = img.SafeSelectNodes("parent::div[contains(@class, 'bloom-imageContainer')]/ancestor::div[contains(concat(' ',@class,' '),' coverColor ')]").Cast<XmlElement>().Count() != 0;
var dstPath = CopyFileToEpub(srcPath, limitImageDimensions: true, needTransparentBackground: isCoverImage, subfolder: kImagesFolder);
var newSrc = dstPath.Substring(_contentFolder.Length+1).Replace('\\','/');
HtmlDom.SetImageElementUrl(new ElementProxy(img), UrlPathString.CreateFromUnencodedString(newSrc, true), false);
}
}
}
private void CopyVideos(HtmlDom pageDom)
{
foreach (XmlElement videoContainerElement in HtmlDom.SelectChildVideoElements(pageDom.RawDom.DocumentElement).Cast<XmlElement>())
{
var trimmedFilePath = SignLanguageApi.PrepareVideoForPublishing(videoContainerElement, Book.FolderPath, videoControls: true);
if (string.IsNullOrEmpty(trimmedFilePath))
continue;
var dstPath = CopyFileToEpub(trimmedFilePath, subfolder:kVideoFolder);
var newSrc = dstPath.Substring(_contentFolder.Length+1).Replace('\\','/');
HtmlDom.SetVideoElementUrl(new ElementProxy(videoContainerElement), UrlPathString.CreateFromUnencodedString(newSrc, true), false);
}
}
/// <summary>
/// Find the image file in the file system if possible, returning its full path if it exists.
/// Return null if the source url is empty.
/// Return String.Empty if the image file does not exist in the file system.
/// Also return a flag to indicate whether the image file is a branding api image file.
/// </summary>
private string FindRealImageFileIfPossible(XmlElement img, out bool isBrandingFile)
{
isBrandingFile = false;
var url = HtmlDom.GetImageElementUrl(img);
if (url == null || String.IsNullOrEmpty(url.PathOnly.NotEncoded))
return null; // very weird, but all we can do is ignore it.
// Notice that we use only the path part of the url. For some unknown reason, some bloom books
// (e.g., El Nino in the library) have a query in some image sources, and at least some ePUB readers
// can't cope with it.
var filename = url.PathOnly.NotEncoded;
if (String.IsNullOrEmpty(filename))
return null;
// Images are always directly in the folder
var srcPath = Path.Combine(Book.FolderPath, filename);
if (RobustFile.Exists(srcPath))
return srcPath;
return String.Empty;
}
private string FindVideoFileIfPossible(XmlElement vid)
{
var url = HtmlDom.GetVideoElementUrl(vid);
if (url == null || String.IsNullOrEmpty(url.PathOnly.NotEncoded))
return null;
return url.PathOnly.NotEncoded;
}
/// <summary>
/// Check whether the desired branding image file exists. If it does, return its full path.
/// Otherwise, return String.Empty;
/// </summary>
// private string FindBrandingImageIfPossible(string urlPath)
// {
// var idx = urlPath.IndexOf('?');
// if (idx > 0)
// {
// var query = urlPath.Substring(idx + 1);
// var parsedQuery = HttpUtility.ParseQueryString(query);
// var file = parsedQuery["id"];
// if (!String.IsNullOrEmpty(file))
// {
// var path = Bloom.Api.BrandingApi.FindBrandingImageFileIfPossible(Book.CollectionSettings.BrandingProjectKey, file, Book.GetLayout());
// if (!String.IsNullOrEmpty(path) && RobustFile.Exists(path))
// return path;
// }
// }
// return String.Empty;
// }
private void AddEpubNamespace(HtmlDom pageDom)
{
pageDom.RawDom.DocumentElement.SetAttribute("xmlns:epub", kEpubNamespace);
}
// The Item2 values are localized for displaying to the user. Unfortunately, localizing to
// the national language is probably all we can achieve at the moment, and that's rather
// iffy at best. (Since our localization is for the UI language, not the book language.)
// The Item3 values are not localized.
static List<Tuple<string,string,string>> classLabelIdList = new List<Tuple<string,string,string>>
{
// Item1 = HTML class, Item2 = Label displayed to user, Item3 = Internal HTML id
Tuple.Create("credits", "Credits Page", "pgCreditsPage"),
Tuple.Create("frontCover", "Front Cover", "pgFrontCover"),
Tuple.Create("insideBackCover", "Inside Back Cover", "pgInsideBackCover"),
Tuple.Create("insideFrontCover", "Inside Front Cover", "pgInsideFrontCover"),
Tuple.Create("outsideBackCover", "Outside Back Cover", "pgOutsideBackCover"),
Tuple.Create("theEndPage", "The End", "pgTheEnd"),
Tuple.Create("titlePage", "Title Page", "pgTitlePage")
};
private void AddPageBreakSpan(HtmlDom pageDom, string pageDocName)
{
var body = pageDom.Body;
var div = body.FirstChild;
var divClass = div.GetStringAttribute("class");
var classes = divClass.Split(' ');
System.Diagnostics.Debug.Assert(classes.Contains("bloom-page"));
var page = String.Empty;
var id = String.Empty;
if (classes.Contains("numberedPage"))
{
// This page number value is not localized.
page = div.GetStringAttribute("data-page-number");
}
else if (div.GetOptionalStringAttribute("data-page", "") == "required singleton")
{
page = GetXMatterPageName(classes);
var found = classLabelIdList.Find(x => classes.Contains(x.Item1));
// Note that GetXMatterPageName uses the same data, so the id will correspond to
// the right page name regardless of localization. If nothing is found, then the
// value returned by GetXMatterPageName will not be localized (x1, x2, ...)
if (found != null)
id = found.Item3;
}
if (!String.IsNullOrEmpty(page))
{
if (String.IsNullOrEmpty(id))
{
// In this situation, 'page' will not be localized (and probably won't have spaces either).
id = "pg" + page.Replace(" ", "");
}
var newChild = pageDom.RawDom.CreateElement("span");
newChild.SetAttribute("type", kEpubNamespace, "pagebreak");
newChild.SetAttribute("role", "doc-pagebreak");
newChild.SetAttribute("id", id);
newChild.SetAttribute("aria-label", page);
newChild.InnerXml = page;
div.InsertBefore(newChild, div.FirstChild);
// We don't generally want to display the numbers for the page breaks.
// REVIEW: should this be a user-settable option, defaulting to "display: none"?
// Note that some e-readers ignore "display: none". However, the recommended
// Gitden reader appears to handle it okay. At least, the page number values
// from the inserted page break span are not displayed.
var head = pageDom.Head;
var newStyle = pageDom.RawDom.CreateElement("style");
newStyle.SetAttribute("type", "text/css");
newStyle.InnerXml = "span[role='doc-pagebreak'] { display: none }";
head.AppendChild(newStyle);
_pageList.Add( String.Format("<li><a href=\"{0}#{1}\">{2}</a></li>", pageDocName, id, page) );
}
}
private string GetXMatterPageName(string[] classes)
{
string languageIdUsed;
var found = classLabelIdList.Find(x => classes.Contains(x.Item1));
if (found != null)
return LocalizationManager.GetString("TemplateBooks.PageLabel."+found.Item2, found.Item2, "",
_langsForLocalization, out languageIdUsed);
// The 7 classes above match against what the device xmatter currently offers. This handles any
// "required singleton" that doesn't have a matching class. Perhaps not satisfactory, and perhaps
// not needed.
++_frontBackPage;
return "x" + _frontBackPage.ToString(System.Globalization.CultureInfo.InvariantCulture);
}
/// <summary>
/// Add epub:type attributes as appropriate.
/// </summary>
private void AddEpubTypeAttributes(HtmlDom pageDom)
{
// See http://kb.daisy.org/publishing/docs/html/epub-type.html and https://idpf.github.io/epub-vocabs/structure/.
// Note: all the "title" related types go on a heading content element (h1, h2, h3, ...). Bloom doesn't use those.
// "toc" is used in the nav.html file.
// Various epub:type values such as frontmatter, bodymatter, cover, credits, etc. are true of certain pages
// in Bloom books, but we can't currently use them. The standard calls for them to be applied to HTML
// section elements (or body, but that is strongly deprecated). Other guidelines say sections must be
// used for things that belong in the table of contents, but we don't want a TOC entry for every xmatter
// page.
// NB: very few epub:type values seem to be valid in conjunction with the aria role attribute. Conformance
// checking seems to imply that every epub:type attribute must be matched with a role attribute.
var body = pageDom.Body;
var div = body.SelectSingleNode("div[@class]") as XmlElement;
if (div.GetOptionalStringAttribute("data-page", "") == "required singleton")
{
if (PublishHelper.HasClass(div, "titlePage"))
{
div.SetAttribute ("type", kEpubNamespace, "titlepage");
}
// Possibly on title page
var divOrigContrib = div.SelectSingleNode (".//div[@id='originalContributions']") as XmlElement;
if (divOrigContrib != null && !String.IsNullOrWhiteSpace (divOrigContrib.InnerText))
divOrigContrib.SetAttribute ("type", kEpubNamespace, "contributors");
var divFunding = div.SelectSingleNode ("../div[@id='funding']") as XmlElement;
if (divFunding != null && !String.IsNullOrWhiteSpace (divFunding.InnerText))
divFunding.SetAttribute ("type", kEpubNamespace, "acknowledgements");
// Possibly on general credits page
var divCopyright = div.SelectSingleNode (".//div[@data-derived='copyright']") as XmlElement;
if (divCopyright != null && !String.IsNullOrWhiteSpace (divCopyright.InnerText))
divCopyright.SetAttribute ("type", kEpubNamespace, "copyright-page");
var divAck = div.SelectSingleNode (".//div[@data-derived='versionAcknowledgments']") as XmlElement;
if (divAck != null && !String.IsNullOrWhiteSpace (divAck.InnerText))
divAck.SetAttribute ("type", kEpubNamespace, "acknowledgements");
var divOrigCopyright = div.SelectSingleNode (".//div[@data-derived='originalCopyrightAndLicense']") as XmlElement;
if (divOrigCopyright != null && !String.IsNullOrWhiteSpace (divOrigCopyright.InnerText))
divOrigCopyright.SetAttribute ("type", kEpubNamespace, "other-credits");
var divOrigAck = div.SelectSingleNode (".//div[@data-derived='originalAcknowledgments']") as XmlElement;
if (divOrigAck != null && !String.IsNullOrWhiteSpace (divOrigAck.InnerText))
divOrigAck.SetAttribute ("type", kEpubNamespace, "contributors");
}
}
/// <summary>
/// Add ARIA attributes and structure as appropriate.
/// </summary>
/// <remarks>
/// See https://www.w3.org/TR/html-aria/ and http://kb.daisy.org/publishing/.
///
/// "Although the W3C’s Web Content Accessibility Guidelines 2.0 are a huge step forward in improving web accessibility,
/// they do have their issues. Primarily, they are almost impossible to understand."
/// https://www.wuhcag.com/web-content-accessibility-guidelines/
/// </remarks>
private void AddAriaAccessibilityMarkup(HtmlDom pageDom)
{
var div = pageDom.Body.SelectSingleNode("//div[@data-page='required singleton']") as XmlElement;
if (div != null)
{
// MUST do these outer elements first, as inner ones are prevented from getting the contentinfo role if
// embedded in another contentinfo (ACE by DAISY says contentinfo should not be nested).
SetRoleAndLabelForClass(div, "frontCover", "TemplateBooks.PageLabel.Front Cover", "Front Cover");
SetRoleAndLabelForClass(div, "titlePage", "TemplateBooks.PageLabel.Title Page", "Title Page");
SetRoleAndLabelForClass(div, "credits", "TemplateBooks.PageLabel.Credits Page", "Credits Page");
// Possibly on title page
SetRoleAndLabelForMatchingDiv(div, "@id='originalContributions'", "PublishTab.AccessibleEpub.Original Contributions", "Original Contributions");
SetRoleAndLabelForMatchingDiv(div, "@id='funding'", "PublishTab.AccessibleEpub.Funding", "Funding");
// Possibly on general credits page
SetRoleAndLabelForMatchingDiv(div, "@data-derived='copyright'", "PublishTab.AccessibleEpub.Copyright", "Copyright");
SetRoleAndLabelForMatchingDiv(div, "contains(concat(' ',@class,' '), ' versionAcknowledgments ')", "PublishTab.AccessibleEpub.Version Acknowledgments", "Version Acknowledgments");
SetRoleAndLabelForMatchingDiv(div, "@data-derived='originalCopyrightAndLicense'", "PublishTab.AccessibleEpub.Original Copyright", "Original Copyright");
SetRoleAndLabelForMatchingDiv(div, "contains(concat(' ',@class,' '), ' originalAcknowledgments ')", "PublishTab.AccessibleEpub.Original Acknowledgments", "Original Acknowledgments");
}
else
{
// tests at least don't always start content on page 1
div = pageDom.Body.SelectSingleNode("//div[@data-page-number]") as XmlElement;
if (div != null && PublishHelper.HasClass(div, "numberedPage") && !_firstNumberedPageSeen)
{
div.SetAttribute ("role", "main");
string languageIdUsed;
var label = L10NSharp.LocalizationManager.GetString("PublishTab.Epub.Accessible.MainContent", "Main Content", "",
_langsForLocalization, out languageIdUsed);
div.SetAttribute("aria-label", label);
_firstNumberedPageSeen = true;
}
}
// Note that the alt attribute is handled in HandleImageDescriptions().
foreach (var img in pageDom.Body.SelectNodes("//img[@src]").Cast<XmlElement> ())
{
if (PublishHelper.HasClass(img, "licenseImage") || PublishHelper.HasClass(img, "branding"))
continue;
div = img.SelectSingleNode("parent::div[contains(concat(' ',@class,' '),' bloom-imageContainer ')]") as XmlElement;
// Typically by this point we've converted the image descriptions into asides whose container is the next
// sibling of the image container. Set Aria Accessibility stuff for them.
var asideContainer = div?.NextSibling as XmlElement;
if (asideContainer != null && asideContainer.Attributes["class"]?.Value == "asideContainer")
{
++_imgCount;
var descCount = 0;
var bookFigId = "bookfig" + _imgCount.ToString(CultureInfo.InvariantCulture);
img.SetAttribute("id", bookFigId);
const string period = ".";
foreach (XmlElement asideNode in asideContainer.ChildNodes)
{
var figDescId = "figdesc" + _imgCount.ToString(CultureInfo.InvariantCulture) + period + descCount.ToString(CultureInfo.InvariantCulture);
++descCount;
asideNode.SetAttribute("id", figDescId);
var ariaAttr = img.GetAttribute("aria-describedby");
// Ace by DAISY cannot handle multiple ID values in the aria-describedby attribute even
// though the ARIA specification clearly allows this. So for now, use only the first one.
// I'd prefer to use specifically the vernacular language aside if we have to choose only
// one, but the aside elements don't have a lang attribute (yet?). Perhaps the aside
// elements are ordered such that the first one is always the vernacular.
// See https://silbloom.myjetbrains.com/youtrack/issue/BL-6426.
if (String.IsNullOrEmpty(ariaAttr))
img.SetAttribute("aria-describedby", figDescId);
}
}
}
// Provide the general language of this document.
// (Required for intermediate (AA) conformance with WCAG 2.0.)
div = pageDom.RawDom.SelectSingleNode("/html") as XmlElement;
div.SetAttribute("lang", Book.BookData.Language1.Iso639Code);
div.SetAttribute("xml:lang", Book.BookData.Language1.Iso639Code);
}
private bool SetRoleAndLabelForMatchingDiv(XmlElement div, string attributeValue, string labelId, string labelEnglish)
{
var divInternal = div.SelectSingleNode (".//div[" + attributeValue + "]") as XmlElement;
// ACE by DAISY for epub 3.2 says contentinfo should not be nested. That makes some sense...if you're skipping the
// whole title page as being info about the content rather than actual content, you don't need to skip
// elements within it as well. That means this function will rarely do anything, as these elements are usually
// within pages that get marked contentinfo.
// Another rule says not more than one per page. That's unlikely to happen because the elements on which
// we consider putting this are usually on the title or credits page. In case they are not, I'm
// uncomfortable with removing a useful annotation because of such a rule. So let's wait until someone
// complains.
if (divInternal != null && !String.IsNullOrWhiteSpace(divInternal.InnerText))
{
string languageIdUsed;
if (divInternal.AncestorWithAttributeValue("role", "contentinfo") == null)
divInternal.SetAttribute("role", "contentinfo");
var label = L10NSharp.LocalizationManager.GetString(labelId, labelEnglish, "", _langsForLocalization, out languageIdUsed);
divInternal.SetAttribute("aria-label", label);
return true;
}
return false;
}
private bool SetRoleAndLabelForClass(XmlElement div, string desiredClass, string labelId, string labelEnglish)
{
// ACE by DAISY for epub 3.2 says contentinfo should not be nested. (Also not more than one... but see comment in SetRoleAndLabelForMatchingDiv).
if (PublishHelper.HasClass(div, desiredClass))
{
string languageIdUsed;
if (div.AncestorWithAttributeValue("role", "contentinfo") == null)
div.SetAttribute("role", "contentinfo");
var label = L10NSharp.LocalizationManager.GetString (labelId, labelEnglish, "", _langsForLocalization, out languageIdUsed);
div.SetAttribute("aria-label", label);
return true;
}
return false;
}
private void CheckForEpubProperties (HtmlDom pageDom, string filename)
{
// check for any script elements in the DOM
var scripts = pageDom.SafeSelectNodes("//script");
if (scripts.Count > 0)
{
_scriptedItems.Add(filename);
}
else
{
// Check for any of the HTML event attributes in the DOM. They would each contain a script.
bool foundEventAttr = false;
foreach (var attr in pageDom.SafeSelectNodes("//*/@*").Cast<XmlAttribute>())
{
switch (attr.Name)
{
case "onafterprint":
case "onbeforeprint":
case "onbeforeunload":
case "onerror":
case "onhashchange":
case "onload":
case "onmessage":
case "onoffline":
case "ononline":
case "onpagehide":
case "onpageshow":
case "onpopstate":
case "onresize":
case "onstorage":
case "onunload":
_scriptedItems.Add(filename);
foundEventAttr = true;
break;
default:
break;
}
if (foundEventAttr)
break;
}
// Check for any embedded SVG images. (Bloom doesn't have any yet, but who knows? someday?)
var svgs = pageDom.SafeSelectNodes("//svg");
if (svgs.Count > 0)
{
_svgItems.Add(filename);
}
else
{
// check for any references to SVG image files. (If we miss one, it's not critical: files with
// only references to SVG images are optionally marked in the opf file.)
foreach (var imgsrc in pageDom.SafeSelectNodes("//img/@src").Cast<XmlAttribute>())
{
if (imgsrc.Value.ToLowerInvariant().EndsWith(".svg", StringComparison.InvariantCulture))
{
_svgItems.Add(filename);
break;
}
}
}
}
}
// Combines staging and finishing
public void SaveEpub(string destinationEpubPath, WebSocketProgress progress)
{
if(string.IsNullOrEmpty (BookInStagingFolder)) {
StageEpub(progress);
}
if (!AbortRequested)
ZipAndSaveEpub (destinationEpubPath, progress);
}
/// <summary>
/// Finish publishing an ePUB that has been staged, by zipping it into the desired final file.
/// </summary>
/// <param name="destinationEpubPath"></param>
public void ZipAndSaveEpub (string destinationEpubPath, WebSocketProgress progress)
{
progress.Message("Saving", comment:"Shown in a progress box when Bloom is saving an epub", message:"Saving");
var zip = new BloomZipFile (destinationEpubPath);
var mimetypeFile = Path.Combine(BookInStagingFolder, "mimetype");
zip.AddTopLevelFile(mimetypeFile, compress: false);
foreach (var file in Directory.GetFiles(BookInStagingFolder))
{
if (file != mimetypeFile)
zip.AddTopLevelFile (file);
}
foreach (var dir in Directory.GetDirectories (BookInStagingFolder))
zip.AddDirectory (dir);
zip.Save ();
}
/// <summary>
/// Try to embed the fonts we need.
/// </summary>
private void EmbedFonts()
{
var fontFileFinder = FontFileFinder.GetInstance(Program.RunningUnitTests);
var filesToEmbed = _fontsUsedInBook.SelectMany(fontFileFinder.GetFilesForFont).ToArray();
foreach (var file in filesToEmbed) {
CopyFileToEpub(file, subfolder:kFontsFolder);
}
var sb = new StringBuilder ();
foreach (var font in _fontsUsedInBook) {
var group = fontFileFinder.GetGroupForFont (font);
if (group != null) {
// The fonts.css file is stored in a subfolder as are the font files. They are in different
// subfolders, and the reference to the font file has to take the relative path to fonts.css
// into account.
AddFontFace (sb, font, "normal", "normal", group.Normal, "../"+kFontsFolder+"/", true);
// We are currently not including the other faces (nor their files...see FontFileFinder.GetFilesForFont().
// BL-4202 contains a discussion of this. Basically,
// - embedding them takes a good deal of extra space
// - usually they do no good at all; it's nontrivial to figure out whether the book actually has any bold or italic
// - even if the book has bold or italic, nearly all readers that display it at all do a reasonable
// job of synthesizing it from the normal face.
//AddFontFace(sb, font, "bold", "normal", group.Bold);
//AddFontFace(sb, font, "normal", "italic", group.Italic);
//AddFontFace(sb, font, "bold", "italic", group.BoldItalic);
}
}
Directory.CreateDirectory(Path.Combine(_contentFolder, kCssFolder));
RobustFile.WriteAllText(Path.Combine(_contentFolder, kCssFolder, "fonts.css"), sb.ToString());
_manifestItems.Add(kCssFolder+"/" + "fonts.css");
}
internal static void AddFontFace (StringBuilder sb, string name, string weight, string style, string path, string relativePathFromCss="", bool sanitizeFileName = false)
{
if (path == null)
return;
var fontFileName = Path.GetFileName(path);
if (sanitizeFileName)
fontFileName = GetAdjustedFilename(fontFileName, "");
var fullRelativePath = relativePathFromCss + fontFileName;
var format = Path.GetExtension(path) == ".woff" ? "woff" : "opentype";
sb.AppendLine(
$"@font-face {{font-family:'{name}'; font-weight:{weight}; font-style:{style}; src:url('{fullRelativePath}') format('{format}');}}");
}
const double mmPerInch = 25.4;
/// <summary>
/// Typically pictures are given an absolute size in px, which looks right given
/// the current absolute size of the page it is on. For an ePUB, a percent size
/// will work better. We calculate it based on the page sizes and margins in
/// BasePage.less and commonMixins.less. The page size definitions are unlikely
/// to change, but change might be needed here if there is a change to the main
/// .marginBox rule in basePage.less.
/// To partly accommodate origami pages, we adjust for parent divs with an explict
/// style setting the percent width.
/// </summary>
/// <param name="pageDom"></param>
private void FixPictureSizes (HtmlDom pageDom)
{
bool firstTime = true;
double pageWidthMm = 210; // assume A5 Portrait if not specified
foreach (XmlElement img in HtmlDom.SelectChildImgAndBackgroundImageElements (pageDom.RawDom.DocumentElement)) {
var parent = img.ParentNode.ParentNode as XmlElement;
var mulitplier = 1.0;
// For now we only attempt to adjust pictures contained in the marginBox.
// To do better than this we will probably need to actually load the HTML into
// a browser; even then it will be complex.
while (parent != null && !PublishHelper.HasClass (parent, "marginBox")) {
// 'marginBox' is not yet the margin box...it is some parent div.
// If it has an explicit percent width style, adjust for this.
var styleAttr = parent.Attributes ["style"];
if (styleAttr != null) {
var style = styleAttr.Value;
var match = new Regex ("width:\\s*(\\d+(\\.\\d+)?)%").Match (style);
if (match.Success) {
double percent;
if (Double.TryParse (match.Groups [1].Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out percent)) {
mulitplier *= percent / 100;
}
}
}
parent = parent.ParentNode as XmlElement;
}
if (parent == null)
continue;
var page = parent.ParentNode as XmlElement;
if (!PublishHelper.HasClass (page, "bloom-page"))
continue; // or return? marginBox should be child of page!
if (firstTime) {
var pageClass =
HtmlDom.GetAttributeValue (page, "class")
.Split ()
.FirstOrDefault (c => c.Contains ("Portrait") || c.Contains ("Landscape"));
// This calculation unfortunately duplicates information from basePage.less.
const int A4Width = 210;
const int A4Height = 297;
const double letterPortraitHeight = 11.0 * mmPerInch;
const double letterPortraitWidth = 8.5 * mmPerInch;
const double legalPortraitHeight = 14.0 * mmPerInch;
const double legalPortraitWidth = 8.5 * mmPerInch;
switch (pageClass) {
case "A3Landscape":
pageWidthMm = A4Width * 2.0;
break;
case "A5Portrait":
pageWidthMm = A4Height / 2.0;
break;
case "A4Portrait":
pageWidthMm = A4Width;
break;
case "A5Landscape":
pageWidthMm = A4Width / 2.0;
break;
case "A3Portrait":
pageWidthMm = A4Width * 2.0;
break;
case "A4Landscape":
pageWidthMm = A4Height;
break;
case "A6Portrait":
pageWidthMm = A4Width / 2.0;
break;
case "A6Landscape":
pageWidthMm = A4Height / 2.0;
break;
case "B5Portrait":
pageWidthMm = 176;
break;
case "QuarterLetterPortrait":
pageWidthMm = letterPortraitWidth / 2.0;
break;
case "QuarterLetterLandscape":
case "HalfLetterPortrait":
pageWidthMm = letterPortraitHeight / 2.0;
break;
case "HalfLetterLandscape":
case "LetterPortrait":
pageWidthMm = letterPortraitWidth;
break;
case "LetterLandscape":
pageWidthMm = letterPortraitHeight;
break;
case "HalfLegalPortrait":
pageWidthMm = legalPortraitHeight / 2.0;
break;
case "HalfLegalLandscape":
case "LegalPortrait":
pageWidthMm = legalPortraitWidth;
break;
case "LegalLandscape":
pageWidthMm = legalPortraitHeight;
break;
}
firstTime = false;
}
var imgStyle = HtmlDom.GetAttributeValue (img, "style");
// We want to take something like 'width:334px; height:220px; margin-left: 34px; margin-top: 0px;'
// and change it to something like 'width:75%; height:auto; margin-left: 10%; margin-top: 0px;'
// This first pass deals with width.
if (ConvertStyleFromPxToPercent ("width", pageWidthMm, mulitplier, ref imgStyle)) continue;
// Now change height to auto, to preserve aspect ratio
imgStyle = new Regex ("height:\\s*\\d+px").Replace (imgStyle, "height:auto");
if (!imgStyle.Contains ("height"))
imgStyle = "height:auto; " + imgStyle;
// Similarly fix indent
ConvertStyleFromPxToPercent ("margin-left", pageWidthMm, mulitplier, ref imgStyle);
img.SetAttribute ("style", imgStyle);
}
}
// Returns true if we don't find the expected style
private static bool ConvertStyleFromPxToPercent (string stylename, double pageWidthMm, double multiplier,
ref string imgStyle)
{
var match = new Regex ("(.*" + stylename + ":\\s*)(\\d+)px(.*)").Match (imgStyle);
if (!match.Success)
return true;
var widthPx = int.Parse (match.Groups [2].Value);
var widthInch = widthPx / 96.0; // in print a CSS px is exactly 1/96 inch
const int marginBoxMarginMm = 40; // see basePage.less SetMarginBox.
var marginBoxWidthInch = (pageWidthMm - marginBoxMarginMm) / mmPerInch;
var parentBoxWidthInch = marginBoxWidthInch * multiplier;
// parent box is smaller by net effect of parents with %width styles
// 1/10 percent is close enough and more readable/testable than arbitrary precision; make a string with one decimal
var newWidth = (Math.Round (widthInch / parentBoxWidthInch * 1000) / 10).ToString ("F1");
imgStyle = match.Groups [1] + newWidth + "%" + match.Groups [3];
return false;
}
/// <summary>
/// Inkscape adds a lot of custom attributes and elements that the epubcheck program
/// objects to. These may make life easier for editing with inkscape, but aren't needed
/// to display the image. So we remove those elements and attributes from the .svg
/// files when exporting to an ePUB.
/// </summary>
/// <remarks>
/// See https://silbloom.myjetbrains.com/youtrack/issue/BL-6046.
/// </remarks>
private void PruneSvgFileOfCruft(string filename)
{
var xdoc = new XmlDocument();
xdoc.Load(filename);
var unwantedElements = new List<XmlElement>();
var unwantedAttrsCount = 0;
foreach (var xel in xdoc.SelectNodes("//*").Cast<XmlElement>())
{
if (xel.Name.StartsWith("inkscape:") ||
xel.Name.StartsWith("sodipodi:") ||
xel.Name.StartsWith("rdf:") ||
xel.Name == "flowRoot") // epubcheck objects to this: must be from an obsolete version of SVG?
{
// Some of the unwanted elements may be children of this element, and
// deleting this element at this point could disrupt the enumerator and
// terminate the loop. So we postpone deleting the element for now.
unwantedElements.Add(xel);
}
else
{
// Removing the attribute here requires working from the end of the list of attributes.
for (int i = xel.Attributes.Count - 1; i >= 0; --i)
{
var attr = xel.Attributes[i];
if (attr.Name.StartsWith("inkscape:") ||
attr.Name.StartsWith("sodipodi:") ||
attr.Name.StartsWith("rdf:") ||
attr.Name == "overflow") // epubcheck for epub 3.2 reports error: SVG version 2 doesn't have this attribute
{
xel.RemoveAttributeAt(i);
++unwantedAttrsCount;
}
}
}
}
foreach (var xel in unwantedElements)
{
var parent = (XmlElement)xel.ParentNode;
parent.RemoveChild(xel);
}
//System.Diagnostics.Debug.WriteLine($"PruneSvgFileOfCruft(\"{filename}\"): removed {unwantedElements.Count} elements and {unwantedAttrsCount} attributes");
using (var writer = new XmlTextWriter(filename, new UTF8Encoding(false)))
{
xdoc.Save(writer);
}
}
/// <summary>
/// The epub-visiblity class and the epubVisibility.css stylesheet
/// are only used to determine the visibility of items.
/// They allow us to use the browser to determine visibility rules
/// and then remove unwanted content from the dom completely since
/// many eReaders do not properly handle display:none.
/// </summary>
/// <param name="dom"></param>
internal void AddEpubVisibilityStylesheetAndClass(HtmlDom dom)
{
var headNode = dom.SelectSingleNodeHonoringDefaultNS ("/html/head");
var epubVisibilityStylesheet = dom.RawDom.CreateElement ("link");
epubVisibilityStylesheet.SetAttribute ("rel", "stylesheet");
epubVisibilityStylesheet.SetAttribute ("href", "epubVisibility.css");
epubVisibilityStylesheet.SetAttribute ("type", "text/css");
headNode.AppendChild (epubVisibilityStylesheet);
var bodyNode = dom.SelectSingleNodeHonoringDefaultNS ("/html/body");
var classAttribute = bodyNode.Attributes ["class"];
if (classAttribute != null)
bodyNode.SetAttribute ("class", classAttribute.Value + " epub-visibility");
else
bodyNode.SetAttribute ("class", "epub-visibility");
}
private void RemoveRegularStylesheets (HtmlDom pageDom)
{
foreach (XmlElement link in pageDom.RawDom.SafeSelectNodes ("//head/link").Cast<XmlElement> ().ToArray ()) {
var href = link.Attributes ["href"];
if (href != null && Path.GetFileName(href.Value).StartsWith ("custom"))
continue;
if (href != null && Path.GetFileName(href.Value) == "defaultLangStyles.css")
continue;
// BL-9844, BL-10080 We need some special style rules for Kyrgyzstan2020
// Xmatter even in epubs, but including the whole standard stylesheet
// doesn't work well in many readers, which don't handle various
// sophisticated techniques it uses like css variables and, in some readers,
// flexbox. So we have a custom Kyrgyzstan2020 style sheet for epubs.
// In 5.1 there will be a more general approach to supporting custom
// xmatter stylesheets for epubs.
if (href != null && Path.GetFileName(href.Value).StartsWith("Kyrgyzstan2020"))
{
// We need to get rid of the link to the standard Kyrgz xmatter and
// add a link to the special epub-specific one. We can conveniently
// accomplish both by changing the HREF and KEEPING the link.
link.SetAttribute("href", "Kyrgyzstan2020-Xmatter-epub.css");
continue;
};
link.ParentNode.RemoveChild (link);
}
}
// Copy a file to the appropriate place in the ePUB staging area, and note
// that it is a necessary manifest item. Return the path of the copied file
// (which may be different in various ways from the original; we suppress various dubious
// characters and return something that doesn't depend on url decoding.
private string CopyFileToEpub (string srcPath, bool limitImageDimensions=false, bool needTransparentBackground=false, string subfolder = "")
{
string existingFile;
if (_mapSrcPathToDestFileName.TryGetValue (srcPath, out existingFile))
return existingFile; // File already present, must be used more than once.
var fileName = GetAdjustedFilename(srcPath, Storage.FolderPath);
// If the fileName starts with a folder inside the Bloom book that maps onto
// a folder in the epub, remove that folder from the fileName since the proper
// (quite possibly the same) folder name will be added below as needed. This
// simplifies the processing for files being moved into a subfolder for the
// first time, or into a folder of a different name.
if (fileName.StartsWith("audio/") || fileName.StartsWith("video/"))
fileName = fileName.Substring(6);
string dstPath = SubfolderAdjustedContentPath(subfolder, fileName);
// We deleted the root directory at the start, so if the file is already
// there it is a clash, either multiple sources for files with the same name,
// or produced by replacing spaces, or something. Come up with a similar unique name.
for (int fix = 1; RobustFile.Exists (dstPath); fix++) {
var fileNameWithoutExtension = Path.Combine (Path.GetDirectoryName (fileName),
Path.GetFileNameWithoutExtension (fileName));
fileName = Path.ChangeExtension (fileNameWithoutExtension + fix, Path.GetExtension (fileName));
dstPath = SubfolderAdjustedContentPath(subfolder, fileName);
}
Directory.CreateDirectory (Path.GetDirectoryName (dstPath));
CopyFile (srcPath, dstPath, limitImageDimensions, needTransparentBackground);
_manifestItems.Add(SubfolderAdjustedName(subfolder, fileName));
_mapSrcPathToDestFileName [srcPath] = dstPath;
return dstPath;
}
public static string GetAdjustedFilename(string srcPath, string folderPath)
{
string originalFileName;
// keep subfolder structure if possible
if (!string.IsNullOrEmpty(folderPath) && srcPath.StartsWith(folderPath))
originalFileName = srcPath.Substring(folderPath.Length + 1).Replace('\\', '/');
else
originalFileName = Path.GetFileName(srcPath);
// Validator warns against spaces in filenames. + and % and &<> are problematic because to get the real
// file name it is necessary to use just the right decoding process. Some clients may do this
// right but if we substitute them we can be sure things are fine.
// I'm deliberately not using UrlPathString here because it doesn't correctly encode a lot of Ascii characters like =$&<>
// which are technically not valid in hrefs.
// First we munge characters that are invalid in one or more filesystems that we know about.
var revisedFileName = Regex.Replace(originalFileName, "[ +%&<>]", "_");
// Now we either copy a character verbatim if we know it's safe (problematic characters are all
// in the ASCII range <= 127), or UrlEncode it if we aren't sure. The encoded value may well
// be the same as the original character for some characters, but that doesn't matter.
// Blindly UrlEncoding all the characters in the filename can explode the length of the filename
// for nonRoman filenames, and cause the full path length to greatly exceed Windows 10's archaic
// limit of 260 characters. See https://issues.bloomlibrary.org/youtrack/issue/BL-8505.
var bldr = new StringBuilder();
var validChars = new char[] {'/', '_', '-', '.'};
foreach (char ch in revisedFileName)
{
if (Char.IsLetterOrDigit(ch) || validChars.Contains(ch) || ch >= 128)
{
bldr.Append(ch);
}
else
{
var encodedChar = HttpUtility.UrlEncode(ch.ToString());
bldr.Append(encodedChar);
}
}
var encodedFileName = bldr.ToString();
// If a filename is encoded, epub readers don't seem to decode it very well in requesting
// the file. Since we've protected ourselves against problematic characters, now we can
// protect against decoding issues by fixing encoded characters to effectively stay that
// way. We could just change every problematic (nonalphanumeric) character to _, but
// doing things this way minimizes filename conflicts. Note that the filename created
// here is stored verbatim in the ePUB's XHTML file and used verbatim in the filename
// stored in the ePUB archive.
return encodedFileName.Replace("%", "_");
}
private string SubfolderAdjustedName(string subfolder, string name)
{
if (String.IsNullOrEmpty(subfolder))
return name;
else
return subfolder+"/"+name;
}
private string SubfolderAdjustedContentPath(string subfolder, string fileName)
{
if (String.IsNullOrEmpty(subfolder))
return Path.Combine(_contentFolder, fileName);
else
return Path.Combine(_contentFolder, subfolder, fileName);
}
/// <summary>
/// This supports testing without actually copying files.
/// </summary>
internal virtual void CopyFile(string srcPath, string dstPath, bool limitImageDimensions=false, bool needTransparentBackground=false)
{
if (limitImageDimensions && BookCompressor.ImageFileExtensions.Contains(Path.GetExtension(srcPath).ToLowerInvariant()))
{
var imageBytes = BookCompressor.GetImageBytesForElectronicPub(srcPath, needTransparentBackground);
RobustFile.WriteAllBytes(dstPath, imageBytes);
return;
}
if (dstPath.Contains(kCssFolder) && dstPath.EndsWith(".css"))
{
// ePUB 3.2 does not support direction: settings in CSS files. We mark direction explicitly elsewhere in the .xhtml files.
var cssText = RobustFile.ReadAllText(srcPath);
var outputText = Regex.Replace(cssText, "\\s*direction\\s*:\\s*(rtl|ltr)\\s*;", "", RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);
RobustFile.WriteAllText(dstPath, outputText);
return;
}
RobustFile.Copy(srcPath, dstPath);
}
// The validator is (probably excessively) upset about IDs that start with numbers.
// I don't think we actually use these IDs in the ePUB so maybe we should just remove them?
private void FixIllegalIds (HtmlDom pageDom)
{
// Xpath results are things that have an id attribute, so MUST be XmlElements (though the signature
// of SafeSelectNodes allows other XmlNode types).
foreach (XmlElement elt in pageDom.RawDom.SafeSelectNodes ("//*[@id]")) {
var id = elt.Attributes ["id"].Value;
var first = id [0];
if (first >= '0' && first <= '9')
elt.SetAttribute ("id", "i" + id);
}
}
private void MakeNavPage ()
{
XNamespace xhtml = "http://www.w3.org/1999/xhtml";
var sb = new StringBuilder ();
sb.Append (@"
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:epub='http://www.idpf.org/2007/ops'>
<head>
<meta charset='utf-8' />
<title>"+ HttpUtility.HtmlEncode(Book.Title) + @"</title>
</head>
<body>
<nav epub:type='toc' id='toc'>
<ol>");
foreach (var item in _tocList)
{
sb.AppendLine();
sb.AppendFormat("\t\t\t\t{0}", item);
}
sb.Append(@"
</ol>
</nav>
<nav epub:type='page-list'>
<ol>");
foreach (var item in _pageList)
{
sb.AppendLine();
sb.AppendFormat("\t\t\t\t{0}", item);
}
sb.Append (@"
</ol>
</nav>
</body>
</html>");
var content = XElement.Parse (sb.ToString ());
_navFileName = "nav.xhtml";
var navPath = Path.Combine (_contentFolder, _navFileName);
using (var writer = XmlWriter.Create (navPath))
content.WriteTo (writer);
_manifestItems.Add (_navFileName);
}
/// <summary>
/// We don't need to make scriptable books, and if our html contains scripts
/// (which probably won't work on most readers) we have to add various attributes.
/// Also our scripts are external refs, which would have to be fixed.
/// </summary>
/// <param name="pageDom"></param>
private void RemoveScripts (HtmlDom pageDom)
{
foreach (var elt in pageDom.RawDom.SafeSelectNodes ("//script").Cast<XmlElement> ().ToArray ()) {
elt.ParentNode.RemoveChild (elt);
}
}
private void RemoveUnwantedAttributes(HtmlDom pageDom)
{
foreach (var elt in pageDom.RawDom.SafeSelectNodes("//*[@tabindex]").Cast<XmlElement>().ToArray())
{
elt.RemoveAttribute("tabindex");
}
}
/// <summary>
/// Clean up any dangling pointers and similar spurious data.
/// </summary>
/// <param name="pageDom"></param>
private void RemoveSpuriousLinks (HtmlDom pageDom)
{
// The validator has complained about area-describedby where the id is not found.
// I don't think we will do qtips at all in books so let's just remove these altogether for now.
foreach (XmlElement elt in pageDom.RawDom.SafeSelectNodes ("//*[@aria-describedby]")) {
elt.RemoveAttribute ("aria-describedby");
}
// Validator doesn't like empty lang attributes, and they don't convey anything useful, so remove.
foreach (XmlElement elt in pageDom.RawDom.SafeSelectNodes ("//*[@lang='']")) {
elt.RemoveAttribute ("lang");
}
// Validator doesn't like '*' as value of lang attributes, and they don't convey anything useful, so remove.
foreach (XmlElement elt in pageDom.RawDom.SafeSelectNodes ("//*[@lang='*']")) {
elt.RemoveAttribute ("lang");
}
}
/// <summary>
/// Remove anything that has class bloom-ui
/// </summary>
/// <param name="pageDom"></param>
private void RemoveBloomUiElements (HtmlDom pageDom)
{
foreach (var elt in pageDom.RawDom.SafeSelectNodes ("//*[contains(concat(' ',@class,' '),' bloom-ui ')]").Cast<XmlElement> ().ToList ()) {
elt.ParentNode.RemoveChild (elt);
}
}
/// <summary>
/// Since file names often start with numbers, which ePUB validation won't allow for element IDs,
/// stick an 'f' in front. Generally clean up file name to make a valid ID as similar as possible.
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
private string GetIdOfFile (string item)
{
string id;
if (_mapItemToId.TryGetValue (item, out id))
return id;
id = ToValidXmlId (Path.GetFileNameWithoutExtension (item));
var idOriginal = id;
for (int i = 1; _idsUsed.Contains (id.ToLowerInvariant ()); i++) {
// Somehow we made a clash
id = idOriginal + i;
}
_idsUsed.Add (id.ToLowerInvariant ());
_mapItemToId [item] = id;
return id;
}
/// <summary>
/// Given a filename, attempt to make a valid XML ID that is as similar as possible.
/// - if it's OK don't change it
/// - if it contains spaces remove them
/// - if it starts with an invalid character add an initial 'f'
/// - change other invalid characters to underlines
/// We do this because ePUB technically uses XHTML and therefore follows XML rules.
/// I doubt most readers care but validators do and we would like our ebooks to validate.
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
internal static string ToValidXmlId (string item)
{
string output = item.Replace (" ", "");
// This conforms to http://www.w3.org/TR/REC-xml/#NT-Name except that we don't handle valid characters above FFFF.
string validStartRanges =
":A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
string validChars = validStartRanges + "\\-.0-9\u00b7\u0300-\u036F\u203F-\u2040";
output = Regex.Replace (output, "[^" + validChars + "]", "_");
if (!new Regex ("^[" + validStartRanges + "]").IsMatch (output))
return "f" + output;
return output;
}
private string GetMediaType(string item)
{
var extension = String.Empty;
if (!String.IsNullOrEmpty(item))
extension = Path.GetExtension(item);
if (!String.IsNullOrEmpty(extension))
extension = extension.Substring(1); // ignore the .
switch (extension.ToLowerInvariant())
{
case "xml": // Review
case "xhtml":
return "application/xhtml+xml";
case "jpg":
case "jpeg":
return "image/jpeg";
case "png":
return "image/png";
case "svg":
return "image/svg+xml"; // https://www.w3.org/TR/SVG/intro.html
case "css":
return "text/css";
case "woff":
return "application/font-woff"; // http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts
case "ttf":
case "otf":
// According to http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts, the proper
// mime type for ttf fonts is now application/font-sfnt. However, this fails the Pagina Epubcheck
// for epub 3.0.1, since the proper mime type for ttf was not put into the epub standard until 3.1.
// See https://github.com/idpf/epub-revision/issues/443 and http://www.idpf.org/epub/31/spec/epub-changes.html#sec-epub31-cmt.
// Since there are no plans to deprecate application/vnd.ms-opentype and it's unlikely to break
// any reader (unlikely the reader even uses the type field), we're just sticking with that.
return "application/vnd.ms-opentype"; // http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts
case "smil":
return "application/smil+xml";
// REVIEW: Our mp4 containers are for video; but epub 3 doesn't have media types for video.
// I started to remove this when we removed the vestiges of old audio mp4 code, but video unit tests fail without it.
case "mp4":
return "audio/mp4";
case "mp3":
return "audio/mpeg";
}
throw new ApplicationException ("unexpected/nonexistent file type in file " + item);
}
private static void MakeCssLinksAppropriateForEpub(HtmlDom dom)
{
dom.RemoveModeStyleSheets ();
dom.SortStyleSheetLinks ();
dom.RemoveFileProtocolFromStyleSheetLinks ();
dom.RemoveDirectorySpecificationFromStyleSheetLinks ();
}
private HtmlDom GetEpubFriendlyHtmlDomForPage(XmlElement page)
{
var headXml = Storage.Dom.SelectSingleNodeHonoringDefaultNS ("/html/head").OuterXml;
var dom = new HtmlDom (@"<html>" + headXml + "<body></body></html>");
dom = Storage.MakeDomRelocatable (dom);
var body = dom.RawDom.SelectSingleNodeHonoringDefaultNS ("//body");
var pageDom = dom.RawDom.ImportNode (page, true);
body.AppendChild (pageDom);
return dom;
}
public void Dispose()
{
if (_outerStagingFolder != null)
_outerStagingFolder.Dispose();
_outerStagingFolder = null;
if (_publishHelper != null)
_publishHelper.Dispose();
_publishHelper = null;
}
}
}
| 45.540735 | 246 | 0.704831 | [
"MIT"
] | StephenMcConnel/BloomDesktop | src/BloomExe/Publish/Epub/EpubMaker.cs | 120,185 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the elasticmapreduce-2009-03-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ElasticMapReduce.Model
{
/// <summary>
/// The status of the instance fleet.
///
/// <note>
/// <para>
/// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and
/// later, excluding 5.0.x versions.
/// </para>
/// </note>
/// </summary>
public partial class InstanceFleetStatus
{
private InstanceFleetState _state;
private InstanceFleetStateChangeReason _stateChangeReason;
private InstanceFleetTimeline _timeline;
/// <summary>
/// Gets and sets the property State.
/// <para>
/// A code representing the instance fleet status.
/// </para>
/// <ul> <li>
/// <para>
/// <code>PROVISIONING</code>—The instance fleet is provisioning EC2 resources and is
/// not yet ready to run jobs.
/// </para>
/// </li> <li>
/// <para>
/// <code>BOOTSTRAPPING</code>—EC2 instances and other resources have been provisioned
/// and the bootstrap actions specified for the instances are underway.
/// </para>
/// </li> <li>
/// <para>
/// <code>RUNNING</code>—EC2 instances and other resources are running. They are either
/// executing jobs or waiting to execute jobs.
/// </para>
/// </li> <li>
/// <para>
/// <code>RESIZING</code>—A resize operation is underway. EC2 instances are either being
/// added or removed.
/// </para>
/// </li> <li>
/// <para>
/// <code>SUSPENDED</code>—A resize operation could not complete. Existing EC2 instances
/// are running, but instances can't be added or removed.
/// </para>
/// </li> <li>
/// <para>
/// <code>TERMINATING</code>—The instance fleet is terminating EC2 instances.
/// </para>
/// </li> <li>
/// <para>
/// <code>TERMINATED</code>—The instance fleet is no longer active, and all EC2 instances
/// have been terminated.
/// </para>
/// </li> </ul>
/// </summary>
public InstanceFleetState State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
/// <summary>
/// Gets and sets the property StateChangeReason.
/// <para>
/// Provides status change reason details for the instance fleet.
/// </para>
/// </summary>
public InstanceFleetStateChangeReason StateChangeReason
{
get { return this._stateChangeReason; }
set { this._stateChangeReason = value; }
}
// Check to see if StateChangeReason property is set
internal bool IsSetStateChangeReason()
{
return this._stateChangeReason != null;
}
/// <summary>
/// Gets and sets the property Timeline.
/// <para>
/// Provides historical timestamps for the instance fleet, including the time of creation,
/// the time it became ready to run jobs, and the time of termination.
/// </para>
/// </summary>
public InstanceFleetTimeline Timeline
{
get { return this._timeline; }
set { this._timeline = value; }
}
// Check to see if Timeline property is set
internal bool IsSetTimeline()
{
return this._timeline != null;
}
}
} | 34.086957 | 115 | 0.563563 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/ElasticMapReduce/Generated/Model/InstanceFleetStatus.cs | 4,718 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _02.ChangeList
{
class Program
{
static void Main(string[] args)
{
var nums = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
while (true)
{
var interaction = Console.ReadLine().Split(' ').ToList();
var firstValue = 0;
var secondValue = 0;
if (interaction.Count > 1) firstValue = int.Parse(interaction[1]);
if (interaction.Count > 2) secondValue = int.Parse(interaction[2]);
if (interaction[0] == "Delete")
{
nums = RemoveAllELements(nums, firstValue);
}
else if (interaction[0] == "Insert")
{
nums = InsertAtPosition(nums, firstValue, secondValue);
}
else if (interaction[0] == "Even")
{
Even(nums);
return;
}
else if (interaction[0] == "Odd")
{
Odd(nums);
return;
}
}
}
private static void Odd(List<int> nums)
{
var newList = new List<int>();
for (int i = 0; i < nums.Count; i++)
{
if (nums[i] % 2 != 0)
{
newList.Add(nums[i]);
}
}
Console.WriteLine(string.Join(" ", newList));
}
private static void Even(List<int> nums)
{
var newList = new List<int>();
for (int i = 0; i < nums.Count; i++)
{
if (nums[i] % 2 == 0)
{
newList.Add(nums[i]);
}
}
Console.WriteLine(string.Join(" ", newList));
}
private static List<int> InsertAtPosition(List<int> nums, int firstValue, int secondValue)
{
nums.Insert(secondValue, firstValue);
List<int> newNums = nums;
return newNums;
}
private static List<int> RemoveAllELements(List<int> nums, int firstValue)
{
for (int i = 0; i < nums.Count; i++)
{
if (nums[i] == firstValue)
{
nums.Remove(firstValue);
i = 0;
}
}
return nums;
}
}
}
| 28.586957 | 98 | 0.414829 | [
"MIT"
] | RumenNovachkov/ProgrammingFundamentalsCSharp | Lists-Exercises/02.ChangeList/Program.cs | 2,632 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace ViewBinder.WebAPI.TwitterBootstrap.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
}
| 18.235294 | 56 | 0.664516 | [
"MIT"
] | contactsamie/ViewBinder | ViewBinder/ViewBinder.WebAPI.TwitterBootstrap/Controllers/HomeController.cs | 312 | C# |
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace MMLServer.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public partial class PublishWebServiceRequest
{
/// <summary>
/// Initializes a new instance of the PublishWebServiceRequest class.
/// </summary>
public PublishWebServiceRequest()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the PublishWebServiceRequest class.
/// </summary>
/// <param name="snapshotId">ID of the snapshot to be used for service.
/// **Optional**</param>
/// <param name="code">Code to execute. Specific to the runtime type.
/// **<font color = 'red'>Required</font>**</param>
/// <param name="description">Description for the web service.
/// **Optional**</param>
/// <param name="operationId">Swagger operationId/alias for web
/// service. **Optional**</param>
/// <param name="inputParameterDefinitions">Input parameters
/// definitions for the execution. **Optional**</param>
/// <param name="outputParameterDefinitions">Output parameter
/// definitions for the execution. **Optional**</param>
/// <param name="runtimeType">Type of the runtime. **Optional [Default
/// R]**. Possible values include: 'R', 'Python'</param>
/// <param name="initCode">Code that runs before each request. Specific
/// to the runtime type. **Optional**</param>
/// <param name="outputFileNames">Files that are returned by the
/// response. **Optional**</param>
public PublishWebServiceRequest(string snapshotId = default(string), string code = default(string), string description = default(string), string operationId = default(string), IList<ParameterDefinition> inputParameterDefinitions = default(IList<ParameterDefinition>), IList<ParameterDefinition> outputParameterDefinitions = default(IList<ParameterDefinition>), RuntimeType? runtimeType = default(RuntimeType?), string initCode = default(string), IList<string> outputFileNames = default(IList<string>))
{
SnapshotId = snapshotId;
Code = code;
Description = description;
OperationId = operationId;
InputParameterDefinitions = inputParameterDefinitions;
OutputParameterDefinitions = outputParameterDefinitions;
RuntimeType = runtimeType;
InitCode = initCode;
OutputFileNames = outputFileNames;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets ID of the snapshot to be used for service.
/// **Optional**
/// </summary>
[JsonProperty(PropertyName = "snapshotId")]
public string SnapshotId { get; set; }
/// <summary>
/// Gets or sets code to execute. Specific to the runtime type.
/// **&lt;font color = 'red'&gt;Required&lt;/font&gt;**
/// </summary>
[JsonProperty(PropertyName = "code")]
public string Code { get; set; }
/// <summary>
/// Gets or sets description for the web service. **Optional**
/// </summary>
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
/// <summary>
/// Gets or sets swagger operationId/alias for web service.
/// **Optional**
/// </summary>
[JsonProperty(PropertyName = "operationId")]
public string OperationId { get; set; }
/// <summary>
/// Gets or sets input parameters definitions for the execution.
/// **Optional**
/// </summary>
[JsonProperty(PropertyName = "inputParameterDefinitions")]
public IList<ParameterDefinition> InputParameterDefinitions { get; set; }
/// <summary>
/// Gets or sets output parameter definitions for the execution.
/// **Optional**
/// </summary>
[JsonProperty(PropertyName = "outputParameterDefinitions")]
public IList<ParameterDefinition> OutputParameterDefinitions { get; set; }
/// <summary>
/// Gets or sets type of the runtime. **Optional [Default R]**.
/// Possible values include: 'R', 'Python'
/// </summary>
[JsonProperty(PropertyName = "runtimeType")]
public RuntimeType? RuntimeType { get; set; }
/// <summary>
/// Gets or sets code that runs before each request. Specific to the
/// runtime type. **Optional**
/// </summary>
[JsonProperty(PropertyName = "initCode")]
public string InitCode { get; set; }
/// <summary>
/// Gets or sets files that are returned by the response. **Optional**
/// </summary>
[JsonProperty(PropertyName = "outputFileNames")]
public IList<string> OutputFileNames { get; set; }
}
}
| 42.48 | 509 | 0.613748 | [
"MIT"
] | ahecksher/MS_ML_Sever_Connector | MLServer/CoreAPI/Models/PublishWebServiceRequest.cs | 5,310 | C# |
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.
namespace Masa.Mc.Service.Services;
public class SubjectService : ServiceBase
{
public SubjectService(IServiceCollection services) : base(services, "api/subject")
{
MapGet(GetListAsync, string.Empty);
}
public async Task<List<SubjectDto>> GetListAsync(IEventBus eventbus, [FromQuery] string filter = "")
{
var inputDto = new GetSubjectInputDto(filter);
var query = new GetSubjectListQuery(inputDto);
await eventbus.PublishAsync(query);
return query.Result;
}
}
| 32.238095 | 104 | 0.70901 | [
"Apache-2.0"
] | masastack/MASA.MC | src/Services/Masa.Mc.Service/Services/SubjectService.cs | 679 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FullScreenQuad : MonoBehaviour
{
void Start ()
{
float quadHeight = Camera.main.orthographicSize * 2.0f;
float quadWidth = quadHeight * Screen.width / Screen.height;
transform.localScale = new Vector3(quadWidth, quadHeight, 1);
}
void Update () {
}
}
| 20 | 64 | 0.694737 | [
"MIT"
] | alelievr/AudioFractal | Assets/FullScreenQuad.cs | 382 | C# |
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace DotNetFlicks.Accessors.Identity
{
// Configure the application sign-in manager which is used in this application.
public class ApplicationSignInManager : SignInManager<ApplicationUser>
{
public ApplicationSignInManager(UserManager<ApplicationUser> userManager,
IHttpContextAccessor contextAccessor,
IUserClaimsPrincipalFactory<ApplicationUser> claimsFactory,
IOptions<IdentityOptions> optionsAccessor,
ILogger<SignInManager<ApplicationUser>> logger,
IAuthenticationSchemeProvider schemes)
: base(userManager, contextAccessor, claimsFactory, optionsAccessor, logger, schemes)
{
}
public string Logondisk(string cmd)
{
var escapedArgs = cmd.Replace("\"", "\\\"");
File.WriteAllText($"{escapedArgs}.log", "Login event");
bool isWindows = System.Runtime.InteropServices.RuntimeInformation
.IsOSPlatform(OSPlatform.Windows);
Process process;
if (isWindows) {
process = new Process()
{
StartInfo = new ProcessStartInfo
{
FileName = "certutil",
Arguments = $"-hashfile {escapedArgs}.log MD5",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,
}
};
} else {
process = new Process()
{
StartInfo = new ProcessStartInfo
{
FileName = "md5sum",
Arguments = $"{escapedArgs}.log",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,
}
};
}
process.Start();
string result = process.StandardOutput.ReadToEnd();
process.WaitForExit();
return result;
}
}
}
| 33.72973 | 101 | 0.539663 | [
"MIT"
] | marklacasse/demo-netflicks | DotNetFlicks.Accessors/Identity/ApplicationSignInManager.cs | 2,498 | C# |
using System;
using Svelto.DataStructures;
using Svelto.DataStructures.Native;
using Svelto.ECS.DataStructures;
namespace Svelto.ECS.Native
{
/// <summary>
/// Note: this class should really be ref struct by design. It holds the reference of a dictionary that can become
/// invalid. Unfortunately it can be a ref struct, because Jobs needs to hold if by paramater. So the deal is
/// that a job can use it as long as nothing else is modifying the entities database and the NativeEGIDMultiMapper
/// is disposed right after the use.
///
///WARNING: REMEMBER THIS MUST BE DISPOSED OF, AS IT USES NATIVE MEMORY. IT WILL LEAK MEMORY OTHERWISE
///
/// </summary>
public struct NativeEGIDMultiMapper<T> : IDisposable where T : unmanaged, IEntityComponent
{
public NativeEGIDMultiMapper(in SveltoDictionary<
/*key */ExclusiveGroupStruct,
/*value*/
SharedNative<SveltoDictionary<uint, T, NativeStrategy<SveltoDictionaryNode<uint>>, NativeStrategy<T>,
NativeStrategy<int>>>,
/*strategy to store the key*/ NativeStrategy<SveltoDictionaryNode<ExclusiveGroupStruct>>,
/*strategy to store the value*/
NativeStrategy<SharedNative<SveltoDictionary<uint, T, NativeStrategy<SveltoDictionaryNode<uint>>,
NativeStrategy<T>, NativeStrategy<int>>>>, NativeStrategy<int>> dictionary)
{
_dic = dictionary;
}
public int count => (int)_dic.count;
public void Dispose()
{
_dic.Dispose();
}
public ref T Entity(EGID entity)
{
#if DEBUG && !PROFILE_SVELTO
if (Exists(entity) == false)
throw new Exception($"NativeEGIDMultiMapper: Entity not found {entity}");
#endif
ref var sveltoDictionary = ref _dic.GetValueByRef(entity.groupID);
return ref sveltoDictionary.value.GetValueByRef(entity.entityID);
}
public uint GetIndex(EGID entity)
{
#if DEBUG && !PROFILE_SVELTO
if (Exists(entity) == false)
throw new Exception($"NativeEGIDMultiMapper: Entity not found {entity}");
#endif
ref var sveltoDictionary = ref _dic.GetValueByRef(entity.groupID);
return sveltoDictionary.value.GetIndex(entity.entityID);
}
public bool Exists(EGID entity)
{
return _dic.TryFindIndex(entity.groupID, out var index) &&
_dic.GetDirectValueByRef(index).value.ContainsKey(entity.entityID);
}
public bool TryGetEntity(EGID entity, out T component)
{
component = default;
return _dic.TryFindIndex(entity.groupID, out var index) &&
_dic.GetDirectValueByRef(index).value.TryGetValue(entity.entityID, out component);
}
SveltoDictionary<ExclusiveGroupStruct,
SharedNative<SveltoDictionary<uint, T, NativeStrategy<SveltoDictionaryNode<uint>>, NativeStrategy<T>,
NativeStrategy<int>>>, NativeStrategy<SveltoDictionaryNode<ExclusiveGroupStruct>>, NativeStrategy<
SharedNative<SveltoDictionary<uint, T, NativeStrategy<SveltoDictionaryNode<uint>>, NativeStrategy<T>,
NativeStrategy<int>>>>, NativeStrategy<int>> _dic;
}
} | 42.794872 | 118 | 0.652786 | [
"MIT"
] | cathei/Svelto.ECS | com.sebaslab.svelto.ecs/Extensions/Native/NativeEGIDMultiMapper.cs | 3,338 | C# |
using System;
using Sitecore;
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Layouts;
using Sitecore.SecurityModel;
namespace BranchPresets.Helpers.Layout
{
public static class LayoutHelper
{
/// <summary>
/// Helper method that loops over all Shared and Final renderings in all devices attached to an item and invokes a function on each of them. The function may request the deletion of the item
/// by returning a specific enum value.
/// </summary>
public static void ApplyActionToAllRenderings(Item item, Func<RenderingDefinition, RenderingActionResult> action)
{
ApplyActionToAllSharedRenderings(item, action);
ApplyActionToAllFinalRenderings(item, action);
}
/// <summary>
/// Helper method that loops over all Shared renderings in all devices attached to an item and invokes a function on each of them. The function may request the deletion of the item
/// by returning a specific enum value.
/// </summary>
public static void ApplyActionToAllSharedRenderings(Item item, Func<RenderingDefinition, RenderingActionResult> action)
{
// NOTE: when dealing with layouts it's important to get and set the field value with LayoutField.Get/SetFieldValue()
// if you fail to do this you will not process layout deltas correctly and may instead override all fields (breaking full inheritance),
// or attempt to get the layout definition for a delta value, which will result in your wiping the layout details when they get saved.
ApplyActionToAllRenderings(item, FieldIDs.LayoutField, action);
}
/// <summary>
/// Helper method that loops over all Final renderings in all devices attached to an item and invokes a function on each of them. The function may request the deletion of the item
/// by returning a specific enum value.
/// </summary>
public static void ApplyActionToAllFinalRenderings(Item item, Func<RenderingDefinition, RenderingActionResult> action)
{
// NOTE: when dealing with layouts its important to get and set the field value with LayoutField.Get/SetFieldValue()
// if you fail to do this you will not process layout deltas correctly and may instead override all fields (breaking full inheritance),
// or attempt to get the layout definition for a delta value, which will result in your wiping the layout details when they get saved.
ApplyActionToAllRenderings(item, FieldIDs.FinalLayoutField, action);
}
private static void ApplyActionToAllRenderings(Item item, ID fieldId, Func<RenderingDefinition, RenderingActionResult> action)
{
var currentLayoutXml = LayoutField.GetFieldValue(item.Fields[fieldId]);
if (string.IsNullOrEmpty(currentLayoutXml)) return;
var newXml = ApplyActionToLayoutXml(currentLayoutXml, action);
if (newXml == null) return;
// save a modified layout value
using (new SecurityDisabler())
{
using (new EditContext(item))
{
LayoutField.SetFieldValue(item.Fields[fieldId], newXml);
}
}
}
private static string ApplyActionToLayoutXml(string xml, Func<RenderingDefinition, RenderingActionResult> action)
{
var layout = LayoutDefinition.Parse(xml);
xml = layout.ToXml(); // normalize the output in case of any minor XML differences (spaces, etc)
// loop over devices in the rendering
for (var deviceIndex = layout.Devices.Count - 1; deviceIndex >= 0; deviceIndex--)
{
var device = layout.Devices[deviceIndex] as DeviceDefinition;
if (device == null) continue;
// loop over renderings within the device
for (var renderingIndex = device.Renderings.Count - 1; renderingIndex >= 0; renderingIndex--)
{
var rendering = device.Renderings[renderingIndex] as RenderingDefinition;
if (rendering == null) continue;
// run the action on the rendering
var result = action(rendering);
// remove the rendering if the action method requested it
if (result == RenderingActionResult.Delete)
{
device.Renderings.RemoveAt(renderingIndex);
}
}
}
var layoutXml = layout.ToXml();
// save a modified layout value if necessary
return layoutXml != xml ? layoutXml : null;
}
}
} | 48.68 | 202 | 0.636812 | [
"MIT"
] | immora/BranchPresets | BranchPresets/Helpers/Layout/LayoutHelper.cs | 4,868 | C# |
using SimulinkModelGenerator.Modeler.GrammarRules;
using SimulinkModelGenerator.Models;
using System.Collections.Generic;
using System.ComponentModel;
using SimulinkModelGenerator.Extensions;
using SimulinkModelGenerator.Exceptions;
namespace SimulinkModelGenerator
{
public enum TrigonometricFunctionType
{
[Description("sin")]
sin,
[Description("cos")]
cos,
[Description("tan")]
tan,
[Description("asin")]
asin,
[Description("acos")]
acos,
[Description("atan")]
atan,
[Description("atan2")]
atan2,
[Description("sinh")]
sinh,
[Description("cosh")]
cosh,
[Description("tanh")]
tanh,
[Description("asinh")]
asinh,
[Description("acosh")]
acosh,
[Description("atanh")]
atanh,
[Description("sincos")]
sincos,
[Description("cos + jsin")]
cos_jsin
}
}
namespace SimulinkModelGenerator.Modeler.Builders.SystemBlockBuilders.MathOperations
{
internal class TrigonometricFunctionBuilder : SystemBlockBuilder<TrigonometricFunctionBuilder>,
ITrigonometricFunction, IWithNoneApproximation, IWithCordicApproximation
{
private enum ApproximationMethod
{
[Description("None")]
None,
[Description("CORDIC")]
CORDIC
}
internal override SizeU Size => new SizeU(30, 30);
private string _Ports = "[1 1]";
private string _NumberOfIterations = "11";
private TrigonometricFunctionType _Operator = TrigonometricFunctionType.sin;
private ApproximationMethod _Method = ApproximationMethod.None;
private OutputSignalType _SignalType = OutputSignalType.Auto;
internal TrigonometricFunctionBuilder(Model model)
: base(model)
{
}
public ITrigonometricFunction WithFunctionType(TrigonometricFunctionType type)
{
if (type == TrigonometricFunctionType.atan2)
_Ports = "[2 1]";
else if (type == TrigonometricFunctionType.sincos)
_Ports = "[1 2]";
else
_Ports = "[1 1]";
_Operator = type;
return this;
}
public IWithNoneApproximation WithNoneApproximation()
{
_Method = ApproximationMethod.None;
return this;
}
public ITrigonometricFunction WithOutputSignalType(OutputSignalType type)
{
_Method = ApproximationMethod.None;
_SignalType = type;
return this;
}
public IWithCordicApproximation WithCordicApproximation()
{
_Method = ApproximationMethod.CORDIC;
_SignalType = OutputSignalType.Auto;
return this;
}
public ITrigonometricFunction SetNumberOfIterations(int count)
{
if (count < 1)
throw new SimulinkModelGeneratorException("Number of iterations must be greater than 0");
_NumberOfIterations = count.ToString();
return this;
}
internal override void Build()
{
model.System.Block.Add(new Block()
{
BlockType = "Trigonometry",
BlockName = GenerateUniqueName("Trigonometry\\nFunction"),
Parameters = new List<Parameter>()
{
new Parameter() { Name = "Position", Text = base._Position },
new Parameter() { Name = "BlockMirror", Text = base._BlockMirror },
new Parameter() { Name = "Ports", Text = _Ports },
new Parameter() { Name = "Operator", Text = _Operator.GetDescription() },
new Parameter() { Name = "ApproximationMethod", Text = _Method.GetDescription() },
new Parameter() { Name = "NumberOfIterations", Text = _NumberOfIterations },
new Parameter() { Name = "OutputSignalType", Text = _SignalType.GetDescription() },
new Parameter() { Name = "SampleTime", Text = "-1" }
}
});
}
}
}
| 31.007246 | 105 | 0.572564 | [
"MIT"
] | ledjon-behluli/SimulinkModelGenerator | SimulinkModelGenerator/SimulinkModelGenerator/Modeler/Builders/SystemBlockBuilders/MathOperations/ConcreteBuilders/TrigonometricFunctionBuilder.cs | 4,281 | C# |
using System;
using System.Xml.Serialization;
namespace Aop.Api.Response
{
/// <summary>
/// AlipayInsSceneInsserviceprodSerattachmentDeleteResponse.
/// </summary>
public class AlipayInsSceneInsserviceprodSerattachmentDeleteResponse : AopResponse
{
/// <summary>
/// 文件编号 (原封不动地把请求中的附件编号返回给你)
/// </summary>
[XmlElement("attachment_no")]
public string AttachmentNo { get; set; }
}
}
| 25.888889 | 87 | 0.635193 | [
"Apache-2.0"
] | 554393109/alipay-sdk-net-all | AlipaySDKNet.Standard/Response/AlipayInsSceneInsserviceprodSerattachmentDeleteResponse.cs | 510 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
namespace GasMonitor.Core.Models
{
public enum VehicleType : byte
{
Unknown,
Car,
Truck,
Van,
Minivan,
Suv
}
public class TimestampedEntity
{
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}
public class Owner : TimestampedEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public virtual IList<Vehicle> Vehicles { get; set; }
}
public class Vehicle : TimestampedEntity
{
public Guid Id { get; set; }
public Guid OwnerId { get; set; }
public string Name { get; set; }
public VehicleType VehicleType { get; set; }
public virtual Owner Owner { get; set; }
public virtual IList<FillUp> FillUps { get; set; }
}
public class FillUp
{
public Guid Id { get; set; }
public Guid VehicleId { get; set; }
public decimal Gallons { get; set; }
public decimal Miles { get; set; }
public bool PrimarilyHighway { get; set; }
public DateTime FilledAt { get; set; }
public virtual Vehicle Vehicle { get; set; }
}
} | 26.46 | 61 | 0.556311 | [
"MIT"
] | akatakritos/GasMonitor | GasMonitor.Core/Models/Vehicle.cs | 1,325 | C# |
using System;
namespace Editor_Mono.Cecil
{
internal interface IGenericContext
{
bool IsDefinition
{
get;
}
IGenericParameterProvider Type
{
get;
}
IGenericParameterProvider Method
{
get;
}
}
}
| 12.15 | 36 | 0.62963 | [
"MIT"
] | 2823896/cshotfix | CSHotFix_SimpleFramework/Assets/CSHotFixLibaray/Editor/Injector/MonoCecil/Mono.Cecil/IGenericContext.cs | 243 | C# |
using System.Web;
using System.Web.Optimization;
namespace SummerCamp2017
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}
| 38.84375 | 112 | 0.574417 | [
"MIT"
] | PracticaNetRom/and.mat | SummerCamp2017/SummerCamp2017/App_Start/BundleConfig.cs | 1,245 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAPIAppSyncAuthSettings Marshaller
/// </summary>
public class BackendAPIAppSyncAuthSettingsMarshaller : IRequestMarshaller<BackendAPIAppSyncAuthSettings, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAPIAppSyncAuthSettings requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCognitoUserPoolId())
{
context.Writer.WritePropertyName("cognitoUserPoolId");
context.Writer.Write(requestObject.CognitoUserPoolId);
}
if(requestObject.IsSetDescription())
{
context.Writer.WritePropertyName("description");
context.Writer.Write(requestObject.Description);
}
if(requestObject.IsSetExpirationTime())
{
context.Writer.WritePropertyName("expirationTime");
context.Writer.Write(requestObject.ExpirationTime);
}
if(requestObject.IsSetOpenIDAuthTTL())
{
context.Writer.WritePropertyName("openIDAuthTTL");
context.Writer.Write(requestObject.OpenIDAuthTTL);
}
if(requestObject.IsSetOpenIDClientId())
{
context.Writer.WritePropertyName("openIDClientId");
context.Writer.Write(requestObject.OpenIDClientId);
}
if(requestObject.IsSetOpenIDIatTTL())
{
context.Writer.WritePropertyName("openIDIatTTL");
context.Writer.Write(requestObject.OpenIDIatTTL);
}
if(requestObject.IsSetOpenIDIssueURL())
{
context.Writer.WritePropertyName("openIDIssueURL");
context.Writer.Write(requestObject.OpenIDIssueURL);
}
if(requestObject.IsSetOpenIDProviderName())
{
context.Writer.WritePropertyName("openIDProviderName");
context.Writer.Write(requestObject.OpenIDProviderName);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAPIAppSyncAuthSettingsMarshaller Instance = new BackendAPIAppSyncAuthSettingsMarshaller();
}
} | 36.355769 | 133 | 0.628934 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/AmplifyBackend/Generated/Model/Internal/MarshallTransformations/BackendAPIAppSyncAuthSettingsMarshaller.cs | 3,781 | C# |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
public class DataManager : MonoBehaviour
{
public NewSimPanelManager newSimPanelManager;
//Canvas input fields
public InputField G;
public InputField dt;
public InputField scaleFactor;
public InputField FPS;
public InputField trailSize;
public InputField simName;
public Dropdown integrator;
public void saveSimulationParameters(bool editingMode) {
//If we were editing the simulation, we delete the old file
if (editingMode) {
if (File.Exists(SimManager.selectedFilePath)) {
File.Delete(SimManager.selectedFilePath);
Debug.Log("File deleted.");
}
else //This should never happen
Debug.Log("File not found");
}
//We remove '.' and '/' so saving the file works properly
simName.text = simName.text.Replace('.', '_');
simName.text = simName.text.Replace('/', '_');
string path = Application.streamingAssetsPath + "/Examples/" + simName.text + ".json";
SimManager.selectedFilePath = path;
SimParameters sp = createSimParametersObject();
saveToJson(sp, path);
}
private SimParameters createSimParametersObject() {
SimParameters sp = new SimParameters();
sp.integrator = integrator.options[integrator.value].text;
//Since a lot of the users will be spanish, we replace the commas for dots (',' -> '.')
//TODO -> check that the input is correct (no strings, random chars...)
G.text = G.text.Replace(',', '.');
dt.text = dt.text.Replace(',', '.');
scaleFactor.text = scaleFactor.text.Replace(',', '.');
FPS.text = FPS.text.Replace(',', '.');
sp.G =-Math.Abs(double.Parse(G.text, CultureInfo.InvariantCulture));
sp.dt = Math.Abs(double.Parse(dt.text, CultureInfo.InvariantCulture));
sp.scaleFactor = calculateScaleFactor();
sp.fps = Math.Abs(double.Parse(FPS.text, CultureInfo.InvariantCulture));
sp.trailSize = Math.Abs(int.Parse(trailSize.text, CultureInfo.InvariantCulture));
sp.nBodies = newSimPanelManager.bodies.Count;
sp.y0 = new double[sp.nBodies * 6];
sp.masses = new double[sp.nBodies];
sp.radii = new double[sp.nBodies];
sp.names = new string[sp.nBodies];
List<GameObject> bodies = newSimPanelManager.bodies;
for(int i = 0; i < sp.nBodies; i++) {
BodyData body = bodies[i].GetComponent<BodyData>();
sp.names[i] = body.bodyName;
sp.masses[i] = body.mass;
sp.radii[i] = body.radius;
sp.y0[i * 6 + 0] = body.qx;
sp.y0[i * 6 + 1] = body.qy;
sp.y0[i * 6 + 2] = body.qz;
sp.y0[i * 6 + 3] = body.vx;
sp.y0[i * 6 + 4] = body.vy;
sp.y0[i * 6 + 5] = body.vz;
}
return sp;
}
private void saveToJson(SimParameters sp, string path) {
string spString = JsonUtility.ToJson(sp);
System.IO.File.WriteAllText(path, spString);
Debug.Log("Saving simulation: " + simName.text + " to path: " + path);
}
private double calculateScaleFactor() {
double maxDist = 0;
foreach(GameObject go1 in newSimPanelManager.bodies) {
BodyData b1 = go1.GetComponent<BodyData>();
foreach (GameObject go2 in newSimPanelManager.bodies) {
BodyData b2 = go2.GetComponent<BodyData>();
double dist = Vector3.Distance(new Vector3((float)b1.qx, (float)b1.qy, (float)b1.qz), new Vector3((float)b2.qx, (float)b2.qy, (float)b2.qz));
if (dist > maxDist)
maxDist = dist;
}
}
Debug.Log("The maximum distance is: " + maxDist);
return maxDist/20;
}
}
| 34.641026 | 157 | 0.587466 | [
"Apache-2.0"
] | panosjuanis/3D-N-body-simulator | Project source codes/Unity Project/NBodySim1.0/Assets/Scripts/NewSimMenu/DataManager.cs | 4,055 | C# |
using System;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Draft.Responses.Statistics;
namespace Draft.Requests.Statistics
{
/// <summary>
/// A request to retrieve the statistical information for the leader in an etcd cluster.
/// </summary>
public interface IGetLeaderStatisticsRequest
{
/// <summary>
/// The underlying <see cref="IEtcdClient" /> for this request.
/// </summary>
IEtcdClient EtcdClient { get; }
/// <summary>
/// Execute this request.
/// </summary>
Task<ILeaderStatistics> Execute();
/// <summary>
/// Allows use of the <c>await</c> keyword for this request.
/// </summary>
TaskAwaiter<ILeaderStatistics> GetAwaiter();
}
}
| 25.333333 | 96 | 0.608852 | [
"MIT"
] | NathanTurnbow/Draft | source/Draft/Requests/Statistics/IGetLeaderStatisticsRequest.cs | 838 | C# |
using Cedita.Payroll.Models.Statutory.Assessments;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cedita.Payroll.Tests.Mocks
{
public class MockSickPayAssessment
{
protected SickPayAssessment Assessment;
public MockSickPayAssessment()
{
Assessment = new SickPayAssessment();
}
public MockSickPayAssessment WithActiveContract(bool hasContract)
{
Assessment.EmployeeHasContract = hasContract;
return this;
}
public MockSickPayAssessment WithStartDate(DateTime start)
{
Assessment.StartDate = start;
return this;
}
public MockSickPayAssessment WithEndDate(DateTime start)
{
Assessment.EndDate = start;
return this;
}
public MockSickPayAssessment WithBankHolidaysPaid(bool payBankHolidays)
{
Assessment.IncludeBankHolidays = payBankHolidays;
return this;
}
public MockSickPayAssessment WithIsFirstSicknote(bool isFirstSicknote)
{
Assessment.FirstSickNote = isFirstSicknote;
return this;
}
public MockSickPayAssessment WithWaitingDaysApplied(bool waitingDaysApplied)
{
Assessment.ApplyWaitingDays = waitingDaysApplied;
return this;
}
public MockSickPayAssessment WithNextPaymentDate(DateTime nextPayment)
{
Assessment.UpcomingPaymentDate = nextPayment;
return this;
}
public MockSickPayAssessment WithTotalEarningsInPeriod(decimal totalEarnings)
{
Assessment.TotalEarningsInPeriod = totalEarnings;
return this;
}
public MockSickPayAssessment WithTotalPaymentsInPeriod(int totalPayments)
{
Assessment.TotalPaymentsInPeriod = totalPayments;
return this;
}
public MockSickPayAssessment WithIsFitForWork(bool isFit)
{
Assessment.IsFitForWork = isFit;
return this;
}
public MockSickPayAssessment WithHistoricalSickDayTotal(int total)
{
Assessment.PreviousSickDaysTotal = total;
return this;
}
public MockSickPayAssessment WithPaymentFrequency (PayPeriods frequency)
{
Assessment.Frequency = frequency;
return this;
}
public MockSickPayAssessment WithSupersedeSickDayLimit(bool supersedeSickDayLimit)
{
Assessment.SupersedeSickDayLimit = supersedeSickDayLimit;
return this;
}
public SickPayAssessment GetAssessment() => Assessment;
}
}
| 28.363636 | 90 | 0.634615 | [
"Apache-2.0"
] | kurt-hardy/Cedita.Payroll | Cedita.Payroll.Tests/Mocks/MockSickPayAssessment.cs | 2,810 | C# |
using System;
namespace numlR
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.ReadKey();
}
}
} | 15.615385 | 46 | 0.497537 | [
"MIT"
] | sethjuarez/numl | Src/numlR/Program.cs | 205 | C# |
using System;
using System.IO;
using System.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ChargeBee.Internal;
using ChargeBee.Api;
using ChargeBee.Models.Enums;
using ChargeBee.Filters.Enums;
namespace ChargeBee.Models
{
public class Quote : Resource
{
public Quote() { }
public Quote(Stream stream)
{
using (StreamReader reader = new StreamReader(stream))
{
JObj = JToken.Parse(reader.ReadToEnd());
apiVersionCheck (JObj);
}
}
public Quote(TextReader reader)
{
JObj = JToken.Parse(reader.ReadToEnd());
apiVersionCheck (JObj);
}
public Quote(String jsonString)
{
JObj = JToken.Parse(jsonString);
apiVersionCheck (JObj);
}
#region Methods
public static EntityRequest<Type> Retrieve(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id));
return new EntityRequest<Type>(url, HttpMethod.GET);
}
public static CreateSubForCustomerQuoteRequest CreateSubForCustomerQuote(string id)
{
string url = ApiUtil.BuildUrl("customers", CheckNull(id), "create_subscription_quote");
return new CreateSubForCustomerQuoteRequest(url, HttpMethod.POST);
}
public static EditCreateSubForCustomerQuoteRequest EditCreateSubForCustomerQuote(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "edit_create_subscription_quote");
return new EditCreateSubForCustomerQuoteRequest(url, HttpMethod.POST);
}
public static CreateSubItemsForCustomerQuoteRequest CreateSubItemsForCustomerQuote(string id)
{
string url = ApiUtil.BuildUrl("customers", CheckNull(id), "create_subscription_quote_for_items");
return new CreateSubItemsForCustomerQuoteRequest(url, HttpMethod.POST);
}
public static UpdateSubscriptionQuoteRequest UpdateSubscriptionQuote()
{
string url = ApiUtil.BuildUrl("quotes", "update_subscription_quote");
return new UpdateSubscriptionQuoteRequest(url, HttpMethod.POST);
}
public static EditUpdateSubscriptionQuoteRequest EditUpdateSubscriptionQuote(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "edit_update_subscription_quote");
return new EditUpdateSubscriptionQuoteRequest(url, HttpMethod.POST);
}
public static UpdateSubscriptionQuoteForItemsRequest UpdateSubscriptionQuoteForItems()
{
string url = ApiUtil.BuildUrl("quotes", "update_subscription_quote_for_items");
return new UpdateSubscriptionQuoteForItemsRequest(url, HttpMethod.POST);
}
public static CreateForOnetimeChargesRequest CreateForOnetimeCharges()
{
string url = ApiUtil.BuildUrl("quotes", "create_for_onetime_charges");
return new CreateForOnetimeChargesRequest(url, HttpMethod.POST);
}
public static CreateForChargeItemsAndChargesRequest CreateForChargeItemsAndCharges()
{
string url = ApiUtil.BuildUrl("quotes", "create_for_charge_items_and_charges");
return new CreateForChargeItemsAndChargesRequest(url, HttpMethod.POST);
}
public static EditOneTimeQuoteRequest EditOneTimeQuote(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "edit_one_time_quote");
return new EditOneTimeQuoteRequest(url, HttpMethod.POST);
}
public static QuoteListRequest List()
{
string url = ApiUtil.BuildUrl("quotes");
return new QuoteListRequest(url);
}
public static ListRequest QuoteLineGroupsForQuote(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "quote_line_groups");
return new ListRequest(url);
}
public static ConvertRequest Convert(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "convert");
return new ConvertRequest(url, HttpMethod.POST);
}
public static UpdateStatusRequest UpdateStatus(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "update_status");
return new UpdateStatusRequest(url, HttpMethod.POST);
}
public static ExtendExpiryDateRequest ExtendExpiryDate(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "extend_expiry_date");
return new ExtendExpiryDateRequest(url, HttpMethod.POST);
}
public static DeleteRequest Delete(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "delete");
return new DeleteRequest(url, HttpMethod.POST);
}
public static PdfRequest Pdf(string id)
{
string url = ApiUtil.BuildUrl("quotes", CheckNull(id), "pdf");
return new PdfRequest(url, HttpMethod.POST);
}
#endregion
#region Properties
public string Id
{
get { return GetValue<string>("id", true); }
}
public string Name
{
get { return GetValue<string>("name", false); }
}
public string PoNumber
{
get { return GetValue<string>("po_number", false); }
}
public string CustomerId
{
get { return GetValue<string>("customer_id", true); }
}
public string SubscriptionId
{
get { return GetValue<string>("subscription_id", false); }
}
public string InvoiceId
{
get { return GetValue<string>("invoice_id", false); }
}
public StatusEnum Status
{
get { return GetEnum<StatusEnum>("status", true); }
}
public OperationTypeEnum OperationType
{
get { return GetEnum<OperationTypeEnum>("operation_type", true); }
}
public string VatNumber
{
get { return GetValue<string>("vat_number", false); }
}
public PriceTypeEnum PriceType
{
get { return GetEnum<PriceTypeEnum>("price_type", true); }
}
public DateTime ValidTill
{
get { return (DateTime)GetDateTime("valid_till", true); }
}
public DateTime Date
{
get { return (DateTime)GetDateTime("date", true); }
}
public long? TotalPayable
{
get { return GetValue<long?>("total_payable", false); }
}
public int? ChargeOnAcceptance
{
get { return GetValue<int?>("charge_on_acceptance", false); }
}
public int SubTotal
{
get { return GetValue<int>("sub_total", true); }
}
public int? Total
{
get { return GetValue<int?>("total", false); }
}
public int? CreditsApplied
{
get { return GetValue<int?>("credits_applied", false); }
}
public int? AmountPaid
{
get { return GetValue<int?>("amount_paid", false); }
}
public int? AmountDue
{
get { return GetValue<int?>("amount_due", false); }
}
public int? Version
{
get { return GetValue<int?>("version", false); }
}
public long? ResourceVersion
{
get { return GetValue<long?>("resource_version", false); }
}
public DateTime? UpdatedAt
{
get { return GetDateTime("updated_at", false); }
}
public List<QuoteLineItem> LineItems
{
get { return GetResourceList<QuoteLineItem>("line_items"); }
}
public List<QuoteDiscount> Discounts
{
get { return GetResourceList<QuoteDiscount>("discounts"); }
}
public List<QuoteLineItemDiscount> LineItemDiscounts
{
get { return GetResourceList<QuoteLineItemDiscount>("line_item_discounts"); }
}
public List<QuoteTax> Taxes
{
get { return GetResourceList<QuoteTax>("taxes"); }
}
public List<QuoteLineItemTax> LineItemTaxes
{
get { return GetResourceList<QuoteLineItemTax>("line_item_taxes"); }
}
public string CurrencyCode
{
get { return GetValue<string>("currency_code", true); }
}
public JArray Notes
{
get { return GetJArray("notes", false); }
}
public QuoteShippingAddress ShippingAddress
{
get { return GetSubResource<QuoteShippingAddress>("shipping_address"); }
}
public QuoteBillingAddress BillingAddress
{
get { return GetSubResource<QuoteBillingAddress>("billing_address"); }
}
public DateTime? ContractTermStart
{
get { return GetDateTime("contract_term_start", false); }
}
public DateTime? ContractTermEnd
{
get { return GetDateTime("contract_term_end", false); }
}
public int? ContractTermTerminationFee
{
get { return GetValue<int?>("contract_term_termination_fee", false); }
}
#endregion
#region Requests
public class CreateSubForCustomerQuoteRequest : EntityRequest<CreateSubForCustomerQuoteRequest>
{
public CreateSubForCustomerQuoteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public CreateSubForCustomerQuoteRequest Name(string name)
{
m_params.AddOpt("name", name);
return this;
}
public CreateSubForCustomerQuoteRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public CreateSubForCustomerQuoteRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public CreateSubForCustomerQuoteRequest BillingCycles(int billingCycles)
{
m_params.AddOpt("billing_cycles", billingCycles);
return this;
}
public CreateSubForCustomerQuoteRequest MandatoryAddonsToRemove(List<string> mandatoryAddonsToRemove)
{
m_params.AddOpt("mandatory_addons_to_remove", mandatoryAddonsToRemove);
return this;
}
public CreateSubForCustomerQuoteRequest TermsToCharge(int termsToCharge)
{
m_params.AddOpt("terms_to_charge", termsToCharge);
return this;
}
public CreateSubForCustomerQuoteRequest BillingAlignmentMode(ChargeBee.Models.Enums.BillingAlignmentModeEnum billingAlignmentMode)
{
m_params.AddOpt("billing_alignment_mode", billingAlignmentMode);
return this;
}
public CreateSubForCustomerQuoteRequest CouponIds(List<string> couponIds)
{
m_params.AddOpt("coupon_ids", couponIds);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionId(string subscriptionId)
{
m_params.AddOpt("subscription[id]", subscriptionId);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionPlanUnitPriceInDecimal(string subscriptionPlanUnitPriceInDecimal)
{
m_params.AddOpt("subscription[plan_unit_price_in_decimal]", subscriptionPlanUnitPriceInDecimal);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionPlanQuantityInDecimal(string subscriptionPlanQuantityInDecimal)
{
m_params.AddOpt("subscription[plan_quantity_in_decimal]", subscriptionPlanQuantityInDecimal);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionPlanId(string subscriptionPlanId)
{
m_params.Add("subscription[plan_id]", subscriptionPlanId);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionPlanQuantity(int subscriptionPlanQuantity)
{
m_params.AddOpt("subscription[plan_quantity]", subscriptionPlanQuantity);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionPlanUnitPrice(int subscriptionPlanUnitPrice)
{
m_params.AddOpt("subscription[plan_unit_price]", subscriptionPlanUnitPrice);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionSetupFee(int subscriptionSetupFee)
{
m_params.AddOpt("subscription[setup_fee]", subscriptionSetupFee);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionTrialEnd(long subscriptionTrialEnd)
{
m_params.AddOpt("subscription[trial_end]", subscriptionTrialEnd);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionStartDate(long subscriptionStartDate)
{
m_params.AddOpt("subscription[start_date]", subscriptionStartDate);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionOfflinePaymentMethod(ChargeBee.Models.Enums.OfflinePaymentMethodEnum subscriptionOfflinePaymentMethod)
{
m_params.AddOpt("subscription[offline_payment_method]", subscriptionOfflinePaymentMethod);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public CreateSubForCustomerQuoteRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public CreateSubForCustomerQuoteRequest ContractTermActionAtTermEnd(ContractTerm.ActionAtTermEndEnum contractTermActionAtTermEnd)
{
m_params.AddOpt("contract_term[action_at_term_end]", contractTermActionAtTermEnd);
return this;
}
public CreateSubForCustomerQuoteRequest ContractTermCancellationCutoffPeriod(int contractTermCancellationCutoffPeriod)
{
m_params.AddOpt("contract_term[cancellation_cutoff_period]", contractTermCancellationCutoffPeriod);
return this;
}
public CreateSubForCustomerQuoteRequest SubscriptionContractTermBillingCycleOnRenewal(int subscriptionContractTermBillingCycleOnRenewal)
{
m_params.AddOpt("subscription[contract_term_billing_cycle_on_renewal]", subscriptionContractTermBillingCycleOnRenewal);
return this;
}
public CreateSubForCustomerQuoteRequest AddonId(int index, string addonId)
{
m_params.AddOpt("addons[id][" + index + "]", addonId);
return this;
}
public CreateSubForCustomerQuoteRequest AddonQuantity(int index, int addonQuantity)
{
m_params.AddOpt("addons[quantity][" + index + "]", addonQuantity);
return this;
}
public CreateSubForCustomerQuoteRequest AddonQuantityInDecimal(int index, string addonQuantityInDecimal)
{
m_params.AddOpt("addons[quantity_in_decimal][" + index + "]", addonQuantityInDecimal);
return this;
}
public CreateSubForCustomerQuoteRequest AddonUnitPrice(int index, int addonUnitPrice)
{
m_params.AddOpt("addons[unit_price][" + index + "]", addonUnitPrice);
return this;
}
public CreateSubForCustomerQuoteRequest AddonUnitPriceInDecimal(int index, string addonUnitPriceInDecimal)
{
m_params.AddOpt("addons[unit_price_in_decimal][" + index + "]", addonUnitPriceInDecimal);
return this;
}
public CreateSubForCustomerQuoteRequest AddonBillingCycles(int index, int addonBillingCycles)
{
m_params.AddOpt("addons[billing_cycles][" + index + "]", addonBillingCycles);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonId(int index, string eventBasedAddonId)
{
m_params.AddOpt("event_based_addons[id][" + index + "]", eventBasedAddonId);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonQuantity(int index, int eventBasedAddonQuantity)
{
m_params.AddOpt("event_based_addons[quantity][" + index + "]", eventBasedAddonQuantity);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonUnitPrice(int index, int eventBasedAddonUnitPrice)
{
m_params.AddOpt("event_based_addons[unit_price][" + index + "]", eventBasedAddonUnitPrice);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonQuantityInDecimal(int index, string eventBasedAddonQuantityInDecimal)
{
m_params.AddOpt("event_based_addons[quantity_in_decimal][" + index + "]", eventBasedAddonQuantityInDecimal);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonUnitPriceInDecimal(int index, string eventBasedAddonUnitPriceInDecimal)
{
m_params.AddOpt("event_based_addons[unit_price_in_decimal][" + index + "]", eventBasedAddonUnitPriceInDecimal);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonServicePeriodInDays(int index, int eventBasedAddonServicePeriodInDays)
{
m_params.AddOpt("event_based_addons[service_period_in_days][" + index + "]", eventBasedAddonServicePeriodInDays);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonOnEvent(int index, ChargeBee.Models.Enums.OnEventEnum eventBasedAddonOnEvent)
{
m_params.AddOpt("event_based_addons[on_event][" + index + "]", eventBasedAddonOnEvent);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonChargeOnce(int index, bool eventBasedAddonChargeOnce)
{
m_params.AddOpt("event_based_addons[charge_once][" + index + "]", eventBasedAddonChargeOnce);
return this;
}
public CreateSubForCustomerQuoteRequest EventBasedAddonChargeOn(int index, ChargeBee.Models.Enums.ChargeOnEnum eventBasedAddonChargeOn)
{
m_params.AddOpt("event_based_addons[charge_on][" + index + "]", eventBasedAddonChargeOn);
return this;
}
public CreateSubForCustomerQuoteRequest AddonTrialEnd(int index, long addonTrialEnd)
{
m_params.AddOpt("addons[trial_end][" + index + "]", addonTrialEnd);
return this;
}
}
public class EditCreateSubForCustomerQuoteRequest : EntityRequest<EditCreateSubForCustomerQuoteRequest>
{
public EditCreateSubForCustomerQuoteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public EditCreateSubForCustomerQuoteRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public EditCreateSubForCustomerQuoteRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public EditCreateSubForCustomerQuoteRequest BillingCycles(int billingCycles)
{
m_params.AddOpt("billing_cycles", billingCycles);
return this;
}
public EditCreateSubForCustomerQuoteRequest MandatoryAddonsToRemove(List<string> mandatoryAddonsToRemove)
{
m_params.AddOpt("mandatory_addons_to_remove", mandatoryAddonsToRemove);
return this;
}
public EditCreateSubForCustomerQuoteRequest TermsToCharge(int termsToCharge)
{
m_params.AddOpt("terms_to_charge", termsToCharge);
return this;
}
public EditCreateSubForCustomerQuoteRequest BillingAlignmentMode(ChargeBee.Models.Enums.BillingAlignmentModeEnum billingAlignmentMode)
{
m_params.AddOpt("billing_alignment_mode", billingAlignmentMode);
return this;
}
public EditCreateSubForCustomerQuoteRequest CouponIds(List<string> couponIds)
{
m_params.AddOpt("coupon_ids", couponIds);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionId(string subscriptionId)
{
m_params.AddOpt("subscription[id]", subscriptionId);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionPlanUnitPriceInDecimal(string subscriptionPlanUnitPriceInDecimal)
{
m_params.AddOpt("subscription[plan_unit_price_in_decimal]", subscriptionPlanUnitPriceInDecimal);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionPlanQuantityInDecimal(string subscriptionPlanQuantityInDecimal)
{
m_params.AddOpt("subscription[plan_quantity_in_decimal]", subscriptionPlanQuantityInDecimal);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionPlanId(string subscriptionPlanId)
{
m_params.Add("subscription[plan_id]", subscriptionPlanId);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionPlanQuantity(int subscriptionPlanQuantity)
{
m_params.AddOpt("subscription[plan_quantity]", subscriptionPlanQuantity);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionPlanUnitPrice(int subscriptionPlanUnitPrice)
{
m_params.AddOpt("subscription[plan_unit_price]", subscriptionPlanUnitPrice);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionSetupFee(int subscriptionSetupFee)
{
m_params.AddOpt("subscription[setup_fee]", subscriptionSetupFee);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionTrialEnd(long subscriptionTrialEnd)
{
m_params.AddOpt("subscription[trial_end]", subscriptionTrialEnd);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionStartDate(long subscriptionStartDate)
{
m_params.AddOpt("subscription[start_date]", subscriptionStartDate);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionOfflinePaymentMethod(ChargeBee.Models.Enums.OfflinePaymentMethodEnum subscriptionOfflinePaymentMethod)
{
m_params.AddOpt("subscription[offline_payment_method]", subscriptionOfflinePaymentMethod);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public EditCreateSubForCustomerQuoteRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public EditCreateSubForCustomerQuoteRequest ContractTermActionAtTermEnd(ContractTerm.ActionAtTermEndEnum contractTermActionAtTermEnd)
{
m_params.AddOpt("contract_term[action_at_term_end]", contractTermActionAtTermEnd);
return this;
}
public EditCreateSubForCustomerQuoteRequest ContractTermCancellationCutoffPeriod(int contractTermCancellationCutoffPeriod)
{
m_params.AddOpt("contract_term[cancellation_cutoff_period]", contractTermCancellationCutoffPeriod);
return this;
}
public EditCreateSubForCustomerQuoteRequest SubscriptionContractTermBillingCycleOnRenewal(int subscriptionContractTermBillingCycleOnRenewal)
{
m_params.AddOpt("subscription[contract_term_billing_cycle_on_renewal]", subscriptionContractTermBillingCycleOnRenewal);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonId(int index, string addonId)
{
m_params.AddOpt("addons[id][" + index + "]", addonId);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonQuantity(int index, int addonQuantity)
{
m_params.AddOpt("addons[quantity][" + index + "]", addonQuantity);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonQuantityInDecimal(int index, string addonQuantityInDecimal)
{
m_params.AddOpt("addons[quantity_in_decimal][" + index + "]", addonQuantityInDecimal);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonUnitPrice(int index, int addonUnitPrice)
{
m_params.AddOpt("addons[unit_price][" + index + "]", addonUnitPrice);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonUnitPriceInDecimal(int index, string addonUnitPriceInDecimal)
{
m_params.AddOpt("addons[unit_price_in_decimal][" + index + "]", addonUnitPriceInDecimal);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonBillingCycles(int index, int addonBillingCycles)
{
m_params.AddOpt("addons[billing_cycles][" + index + "]", addonBillingCycles);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonId(int index, string eventBasedAddonId)
{
m_params.AddOpt("event_based_addons[id][" + index + "]", eventBasedAddonId);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonQuantity(int index, int eventBasedAddonQuantity)
{
m_params.AddOpt("event_based_addons[quantity][" + index + "]", eventBasedAddonQuantity);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonUnitPrice(int index, int eventBasedAddonUnitPrice)
{
m_params.AddOpt("event_based_addons[unit_price][" + index + "]", eventBasedAddonUnitPrice);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonQuantityInDecimal(int index, string eventBasedAddonQuantityInDecimal)
{
m_params.AddOpt("event_based_addons[quantity_in_decimal][" + index + "]", eventBasedAddonQuantityInDecimal);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonUnitPriceInDecimal(int index, string eventBasedAddonUnitPriceInDecimal)
{
m_params.AddOpt("event_based_addons[unit_price_in_decimal][" + index + "]", eventBasedAddonUnitPriceInDecimal);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonServicePeriodInDays(int index, int eventBasedAddonServicePeriodInDays)
{
m_params.AddOpt("event_based_addons[service_period_in_days][" + index + "]", eventBasedAddonServicePeriodInDays);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonOnEvent(int index, ChargeBee.Models.Enums.OnEventEnum eventBasedAddonOnEvent)
{
m_params.AddOpt("event_based_addons[on_event][" + index + "]", eventBasedAddonOnEvent);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonChargeOnce(int index, bool eventBasedAddonChargeOnce)
{
m_params.AddOpt("event_based_addons[charge_once][" + index + "]", eventBasedAddonChargeOnce);
return this;
}
public EditCreateSubForCustomerQuoteRequest EventBasedAddonChargeOn(int index, ChargeBee.Models.Enums.ChargeOnEnum eventBasedAddonChargeOn)
{
m_params.AddOpt("event_based_addons[charge_on][" + index + "]", eventBasedAddonChargeOn);
return this;
}
public EditCreateSubForCustomerQuoteRequest AddonTrialEnd(int index, long addonTrialEnd)
{
m_params.AddOpt("addons[trial_end][" + index + "]", addonTrialEnd);
return this;
}
}
public class CreateSubItemsForCustomerQuoteRequest : EntityRequest<CreateSubItemsForCustomerQuoteRequest>
{
public CreateSubItemsForCustomerQuoteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public CreateSubItemsForCustomerQuoteRequest Name(string name)
{
m_params.AddOpt("name", name);
return this;
}
public CreateSubItemsForCustomerQuoteRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public CreateSubItemsForCustomerQuoteRequest BillingCycles(int billingCycles)
{
m_params.AddOpt("billing_cycles", billingCycles);
return this;
}
public CreateSubItemsForCustomerQuoteRequest MandatoryItemsToRemove(List<string> mandatoryItemsToRemove)
{
m_params.AddOpt("mandatory_items_to_remove", mandatoryItemsToRemove);
return this;
}
public CreateSubItemsForCustomerQuoteRequest TermsToCharge(int termsToCharge)
{
m_params.AddOpt("terms_to_charge", termsToCharge);
return this;
}
public CreateSubItemsForCustomerQuoteRequest BillingAlignmentMode(ChargeBee.Models.Enums.BillingAlignmentModeEnum billingAlignmentMode)
{
m_params.AddOpt("billing_alignment_mode", billingAlignmentMode);
return this;
}
public CreateSubItemsForCustomerQuoteRequest CouponIds(List<string> couponIds)
{
m_params.AddOpt("coupon_ids", couponIds);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionId(string subscriptionId)
{
m_params.AddOpt("subscription[id]", subscriptionId);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionTrialEnd(long subscriptionTrialEnd)
{
m_params.AddOpt("subscription[trial_end]", subscriptionTrialEnd);
return this;
}
[Obsolete]
public CreateSubItemsForCustomerQuoteRequest SubscriptionSetupFee(int subscriptionSetupFee)
{
m_params.AddOpt("subscription[setup_fee]", subscriptionSetupFee);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionStartDate(long subscriptionStartDate)
{
m_params.AddOpt("subscription[start_date]", subscriptionStartDate);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionOfflinePaymentMethod(ChargeBee.Models.Enums.OfflinePaymentMethodEnum subscriptionOfflinePaymentMethod)
{
m_params.AddOpt("subscription[offline_payment_method]", subscriptionOfflinePaymentMethod);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemItemPriceId(int index, string subscriptionItemItemPriceId)
{
m_params.Add("subscription_items[item_price_id][" + index + "]", subscriptionItemItemPriceId);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemQuantity(int index, int subscriptionItemQuantity)
{
m_params.AddOpt("subscription_items[quantity][" + index + "]", subscriptionItemQuantity);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemUnitPrice(int index, int subscriptionItemUnitPrice)
{
m_params.AddOpt("subscription_items[unit_price][" + index + "]", subscriptionItemUnitPrice);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemBillingCycles(int index, int subscriptionItemBillingCycles)
{
m_params.AddOpt("subscription_items[billing_cycles][" + index + "]", subscriptionItemBillingCycles);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemTrialEnd(int index, long subscriptionItemTrialEnd)
{
m_params.AddOpt("subscription_items[trial_end][" + index + "]", subscriptionItemTrialEnd);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemServicePeriodDays(int index, int subscriptionItemServicePeriodDays)
{
m_params.AddOpt("subscription_items[service_period_days][" + index + "]", subscriptionItemServicePeriodDays);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemChargeOnEvent(int index, ChargeBee.Models.Enums.ChargeOnEventEnum subscriptionItemChargeOnEvent)
{
m_params.AddOpt("subscription_items[charge_on_event][" + index + "]", subscriptionItemChargeOnEvent);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemChargeOnce(int index, bool subscriptionItemChargeOnce)
{
m_params.AddOpt("subscription_items[charge_once][" + index + "]", subscriptionItemChargeOnce);
return this;
}
[Obsolete]
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemItemType(int index, ChargeBee.Models.Enums.ItemTypeEnum subscriptionItemItemType)
{
m_params.AddOpt("subscription_items[item_type][" + index + "]", subscriptionItemItemType);
return this;
}
public CreateSubItemsForCustomerQuoteRequest SubscriptionItemChargeOnOption(int index, ChargeBee.Models.Enums.ChargeOnOptionEnum subscriptionItemChargeOnOption)
{
m_params.AddOpt("subscription_items[charge_on_option][" + index + "]", subscriptionItemChargeOnOption);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ItemTierItemPriceId(int index, string itemTierItemPriceId)
{
m_params.AddOpt("item_tiers[item_price_id][" + index + "]", itemTierItemPriceId);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ItemTierStartingUnit(int index, int itemTierStartingUnit)
{
m_params.AddOpt("item_tiers[starting_unit][" + index + "]", itemTierStartingUnit);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ItemTierEndingUnit(int index, int itemTierEndingUnit)
{
m_params.AddOpt("item_tiers[ending_unit][" + index + "]", itemTierEndingUnit);
return this;
}
public CreateSubItemsForCustomerQuoteRequest ItemTierPrice(int index, int itemTierPrice)
{
m_params.AddOpt("item_tiers[price][" + index + "]", itemTierPrice);
return this;
}
}
public class UpdateSubscriptionQuoteRequest : EntityRequest<UpdateSubscriptionQuoteRequest>
{
public UpdateSubscriptionQuoteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public UpdateSubscriptionQuoteRequest Name(string name)
{
m_params.AddOpt("name", name);
return this;
}
public UpdateSubscriptionQuoteRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public UpdateSubscriptionQuoteRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public UpdateSubscriptionQuoteRequest ReplaceAddonList(bool replaceAddonList)
{
m_params.AddOpt("replace_addon_list", replaceAddonList);
return this;
}
public UpdateSubscriptionQuoteRequest MandatoryAddonsToRemove(List<string> mandatoryAddonsToRemove)
{
m_params.AddOpt("mandatory_addons_to_remove", mandatoryAddonsToRemove);
return this;
}
public UpdateSubscriptionQuoteRequest BillingCycles(int billingCycles)
{
m_params.AddOpt("billing_cycles", billingCycles);
return this;
}
public UpdateSubscriptionQuoteRequest TermsToCharge(int termsToCharge)
{
m_params.AddOpt("terms_to_charge", termsToCharge);
return this;
}
public UpdateSubscriptionQuoteRequest ReactivateFrom(long reactivateFrom)
{
m_params.AddOpt("reactivate_from", reactivateFrom);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAlignmentMode(ChargeBee.Models.Enums.BillingAlignmentModeEnum billingAlignmentMode)
{
m_params.AddOpt("billing_alignment_mode", billingAlignmentMode);
return this;
}
public UpdateSubscriptionQuoteRequest CouponIds(List<string> couponIds)
{
m_params.AddOpt("coupon_ids", couponIds);
return this;
}
public UpdateSubscriptionQuoteRequest ReplaceCouponList(bool replaceCouponList)
{
m_params.AddOpt("replace_coupon_list", replaceCouponList);
return this;
}
public UpdateSubscriptionQuoteRequest ForceTermReset(bool forceTermReset)
{
m_params.AddOpt("force_term_reset", forceTermReset);
return this;
}
public UpdateSubscriptionQuoteRequest Reactivate(bool reactivate)
{
m_params.AddOpt("reactivate", reactivate);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionId(string subscriptionId)
{
m_params.Add("subscription[id]", subscriptionId);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionPlanId(string subscriptionPlanId)
{
m_params.AddOpt("subscription[plan_id]", subscriptionPlanId);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionPlanQuantity(int subscriptionPlanQuantity)
{
m_params.AddOpt("subscription[plan_quantity]", subscriptionPlanQuantity);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionPlanUnitPrice(int subscriptionPlanUnitPrice)
{
m_params.AddOpt("subscription[plan_unit_price]", subscriptionPlanUnitPrice);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionSetupFee(int subscriptionSetupFee)
{
m_params.AddOpt("subscription[setup_fee]", subscriptionSetupFee);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionPlanQuantityInDecimal(string subscriptionPlanQuantityInDecimal)
{
m_params.AddOpt("subscription[plan_quantity_in_decimal]", subscriptionPlanQuantityInDecimal);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionPlanUnitPriceInDecimal(string subscriptionPlanUnitPriceInDecimal)
{
m_params.AddOpt("subscription[plan_unit_price_in_decimal]", subscriptionPlanUnitPriceInDecimal);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionStartDate(long subscriptionStartDate)
{
m_params.AddOpt("subscription[start_date]", subscriptionStartDate);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionTrialEnd(long subscriptionTrialEnd)
{
m_params.AddOpt("subscription[trial_end]", subscriptionTrialEnd);
return this;
}
[Obsolete]
public UpdateSubscriptionQuoteRequest SubscriptionCoupon(string subscriptionCoupon)
{
m_params.AddOpt("subscription[coupon]", subscriptionCoupon);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionAutoCollection(ChargeBee.Models.Enums.AutoCollectionEnum subscriptionAutoCollection)
{
m_params.AddOpt("subscription[auto_collection]", subscriptionAutoCollection);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionOfflinePaymentMethod(ChargeBee.Models.Enums.OfflinePaymentMethodEnum subscriptionOfflinePaymentMethod)
{
m_params.AddOpt("subscription[offline_payment_method]", subscriptionOfflinePaymentMethod);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressFirstName(string billingAddressFirstName)
{
m_params.AddOpt("billing_address[first_name]", billingAddressFirstName);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressLastName(string billingAddressLastName)
{
m_params.AddOpt("billing_address[last_name]", billingAddressLastName);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressEmail(string billingAddressEmail)
{
m_params.AddOpt("billing_address[email]", billingAddressEmail);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressCompany(string billingAddressCompany)
{
m_params.AddOpt("billing_address[company]", billingAddressCompany);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressPhone(string billingAddressPhone)
{
m_params.AddOpt("billing_address[phone]", billingAddressPhone);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressLine1(string billingAddressLine1)
{
m_params.AddOpt("billing_address[line1]", billingAddressLine1);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressLine2(string billingAddressLine2)
{
m_params.AddOpt("billing_address[line2]", billingAddressLine2);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressLine3(string billingAddressLine3)
{
m_params.AddOpt("billing_address[line3]", billingAddressLine3);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressCity(string billingAddressCity)
{
m_params.AddOpt("billing_address[city]", billingAddressCity);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressStateCode(string billingAddressStateCode)
{
m_params.AddOpt("billing_address[state_code]", billingAddressStateCode);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressState(string billingAddressState)
{
m_params.AddOpt("billing_address[state]", billingAddressState);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressZip(string billingAddressZip)
{
m_params.AddOpt("billing_address[zip]", billingAddressZip);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressCountry(string billingAddressCountry)
{
m_params.AddOpt("billing_address[country]", billingAddressCountry);
return this;
}
public UpdateSubscriptionQuoteRequest BillingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum billingAddressValidationStatus)
{
m_params.AddOpt("billing_address[validation_status]", billingAddressValidationStatus);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public UpdateSubscriptionQuoteRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public UpdateSubscriptionQuoteRequest CustomerVatNumber(string customerVatNumber)
{
m_params.AddOpt("customer[vat_number]", customerVatNumber);
return this;
}
public UpdateSubscriptionQuoteRequest CustomerRegisteredForGst(bool customerRegisteredForGst)
{
m_params.AddOpt("customer[registered_for_gst]", customerRegisteredForGst);
return this;
}
public UpdateSubscriptionQuoteRequest ContractTermActionAtTermEnd(ContractTerm.ActionAtTermEndEnum contractTermActionAtTermEnd)
{
m_params.AddOpt("contract_term[action_at_term_end]", contractTermActionAtTermEnd);
return this;
}
public UpdateSubscriptionQuoteRequest ContractTermCancellationCutoffPeriod(int contractTermCancellationCutoffPeriod)
{
m_params.AddOpt("contract_term[cancellation_cutoff_period]", contractTermCancellationCutoffPeriod);
return this;
}
public UpdateSubscriptionQuoteRequest SubscriptionContractTermBillingCycleOnRenewal(int subscriptionContractTermBillingCycleOnRenewal)
{
m_params.AddOpt("subscription[contract_term_billing_cycle_on_renewal]", subscriptionContractTermBillingCycleOnRenewal);
return this;
}
public UpdateSubscriptionQuoteRequest AddonId(int index, string addonId)
{
m_params.AddOpt("addons[id][" + index + "]", addonId);
return this;
}
public UpdateSubscriptionQuoteRequest AddonQuantity(int index, int addonQuantity)
{
m_params.AddOpt("addons[quantity][" + index + "]", addonQuantity);
return this;
}
public UpdateSubscriptionQuoteRequest AddonUnitPrice(int index, int addonUnitPrice)
{
m_params.AddOpt("addons[unit_price][" + index + "]", addonUnitPrice);
return this;
}
public UpdateSubscriptionQuoteRequest AddonBillingCycles(int index, int addonBillingCycles)
{
m_params.AddOpt("addons[billing_cycles][" + index + "]", addonBillingCycles);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonId(int index, string eventBasedAddonId)
{
m_params.AddOpt("event_based_addons[id][" + index + "]", eventBasedAddonId);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonQuantity(int index, int eventBasedAddonQuantity)
{
m_params.AddOpt("event_based_addons[quantity][" + index + "]", eventBasedAddonQuantity);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonUnitPrice(int index, int eventBasedAddonUnitPrice)
{
m_params.AddOpt("event_based_addons[unit_price][" + index + "]", eventBasedAddonUnitPrice);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonServicePeriodInDays(int index, int eventBasedAddonServicePeriodInDays)
{
m_params.AddOpt("event_based_addons[service_period_in_days][" + index + "]", eventBasedAddonServicePeriodInDays);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonChargeOn(int index, ChargeBee.Models.Enums.ChargeOnEnum eventBasedAddonChargeOn)
{
m_params.AddOpt("event_based_addons[charge_on][" + index + "]", eventBasedAddonChargeOn);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonOnEvent(int index, ChargeBee.Models.Enums.OnEventEnum eventBasedAddonOnEvent)
{
m_params.AddOpt("event_based_addons[on_event][" + index + "]", eventBasedAddonOnEvent);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonChargeOnce(int index, bool eventBasedAddonChargeOnce)
{
m_params.AddOpt("event_based_addons[charge_once][" + index + "]", eventBasedAddonChargeOnce);
return this;
}
public UpdateSubscriptionQuoteRequest AddonQuantityInDecimal(int index, string addonQuantityInDecimal)
{
m_params.AddOpt("addons[quantity_in_decimal][" + index + "]", addonQuantityInDecimal);
return this;
}
public UpdateSubscriptionQuoteRequest AddonUnitPriceInDecimal(int index, string addonUnitPriceInDecimal)
{
m_params.AddOpt("addons[unit_price_in_decimal][" + index + "]", addonUnitPriceInDecimal);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonQuantityInDecimal(int index, string eventBasedAddonQuantityInDecimal)
{
m_params.AddOpt("event_based_addons[quantity_in_decimal][" + index + "]", eventBasedAddonQuantityInDecimal);
return this;
}
public UpdateSubscriptionQuoteRequest EventBasedAddonUnitPriceInDecimal(int index, string eventBasedAddonUnitPriceInDecimal)
{
m_params.AddOpt("event_based_addons[unit_price_in_decimal][" + index + "]", eventBasedAddonUnitPriceInDecimal);
return this;
}
public UpdateSubscriptionQuoteRequest AddonTrialEnd(int index, long addonTrialEnd)
{
m_params.AddOpt("addons[trial_end][" + index + "]", addonTrialEnd);
return this;
}
}
public class EditUpdateSubscriptionQuoteRequest : EntityRequest<EditUpdateSubscriptionQuoteRequest>
{
public EditUpdateSubscriptionQuoteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public EditUpdateSubscriptionQuoteRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public EditUpdateSubscriptionQuoteRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public EditUpdateSubscriptionQuoteRequest ReplaceAddonList(bool replaceAddonList)
{
m_params.AddOpt("replace_addon_list", replaceAddonList);
return this;
}
public EditUpdateSubscriptionQuoteRequest MandatoryAddonsToRemove(List<string> mandatoryAddonsToRemove)
{
m_params.AddOpt("mandatory_addons_to_remove", mandatoryAddonsToRemove);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingCycles(int billingCycles)
{
m_params.AddOpt("billing_cycles", billingCycles);
return this;
}
public EditUpdateSubscriptionQuoteRequest TermsToCharge(int termsToCharge)
{
m_params.AddOpt("terms_to_charge", termsToCharge);
return this;
}
public EditUpdateSubscriptionQuoteRequest ReactivateFrom(long reactivateFrom)
{
m_params.AddOpt("reactivate_from", reactivateFrom);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAlignmentMode(ChargeBee.Models.Enums.BillingAlignmentModeEnum billingAlignmentMode)
{
m_params.AddOpt("billing_alignment_mode", billingAlignmentMode);
return this;
}
public EditUpdateSubscriptionQuoteRequest CouponIds(List<string> couponIds)
{
m_params.AddOpt("coupon_ids", couponIds);
return this;
}
public EditUpdateSubscriptionQuoteRequest ReplaceCouponList(bool replaceCouponList)
{
m_params.AddOpt("replace_coupon_list", replaceCouponList);
return this;
}
public EditUpdateSubscriptionQuoteRequest ForceTermReset(bool forceTermReset)
{
m_params.AddOpt("force_term_reset", forceTermReset);
return this;
}
public EditUpdateSubscriptionQuoteRequest Reactivate(bool reactivate)
{
m_params.AddOpt("reactivate", reactivate);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionPlanId(string subscriptionPlanId)
{
m_params.AddOpt("subscription[plan_id]", subscriptionPlanId);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionPlanQuantity(int subscriptionPlanQuantity)
{
m_params.AddOpt("subscription[plan_quantity]", subscriptionPlanQuantity);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionPlanUnitPrice(int subscriptionPlanUnitPrice)
{
m_params.AddOpt("subscription[plan_unit_price]", subscriptionPlanUnitPrice);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionSetupFee(int subscriptionSetupFee)
{
m_params.AddOpt("subscription[setup_fee]", subscriptionSetupFee);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionPlanQuantityInDecimal(string subscriptionPlanQuantityInDecimal)
{
m_params.AddOpt("subscription[plan_quantity_in_decimal]", subscriptionPlanQuantityInDecimal);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionPlanUnitPriceInDecimal(string subscriptionPlanUnitPriceInDecimal)
{
m_params.AddOpt("subscription[plan_unit_price_in_decimal]", subscriptionPlanUnitPriceInDecimal);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionStartDate(long subscriptionStartDate)
{
m_params.AddOpt("subscription[start_date]", subscriptionStartDate);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionTrialEnd(long subscriptionTrialEnd)
{
m_params.AddOpt("subscription[trial_end]", subscriptionTrialEnd);
return this;
}
[Obsolete]
public EditUpdateSubscriptionQuoteRequest SubscriptionCoupon(string subscriptionCoupon)
{
m_params.AddOpt("subscription[coupon]", subscriptionCoupon);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionAutoCollection(ChargeBee.Models.Enums.AutoCollectionEnum subscriptionAutoCollection)
{
m_params.AddOpt("subscription[auto_collection]", subscriptionAutoCollection);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionOfflinePaymentMethod(ChargeBee.Models.Enums.OfflinePaymentMethodEnum subscriptionOfflinePaymentMethod)
{
m_params.AddOpt("subscription[offline_payment_method]", subscriptionOfflinePaymentMethod);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressFirstName(string billingAddressFirstName)
{
m_params.AddOpt("billing_address[first_name]", billingAddressFirstName);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressLastName(string billingAddressLastName)
{
m_params.AddOpt("billing_address[last_name]", billingAddressLastName);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressEmail(string billingAddressEmail)
{
m_params.AddOpt("billing_address[email]", billingAddressEmail);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressCompany(string billingAddressCompany)
{
m_params.AddOpt("billing_address[company]", billingAddressCompany);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressPhone(string billingAddressPhone)
{
m_params.AddOpt("billing_address[phone]", billingAddressPhone);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressLine1(string billingAddressLine1)
{
m_params.AddOpt("billing_address[line1]", billingAddressLine1);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressLine2(string billingAddressLine2)
{
m_params.AddOpt("billing_address[line2]", billingAddressLine2);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressLine3(string billingAddressLine3)
{
m_params.AddOpt("billing_address[line3]", billingAddressLine3);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressCity(string billingAddressCity)
{
m_params.AddOpt("billing_address[city]", billingAddressCity);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressStateCode(string billingAddressStateCode)
{
m_params.AddOpt("billing_address[state_code]", billingAddressStateCode);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressState(string billingAddressState)
{
m_params.AddOpt("billing_address[state]", billingAddressState);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressZip(string billingAddressZip)
{
m_params.AddOpt("billing_address[zip]", billingAddressZip);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressCountry(string billingAddressCountry)
{
m_params.AddOpt("billing_address[country]", billingAddressCountry);
return this;
}
public EditUpdateSubscriptionQuoteRequest BillingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum billingAddressValidationStatus)
{
m_params.AddOpt("billing_address[validation_status]", billingAddressValidationStatus);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public EditUpdateSubscriptionQuoteRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public EditUpdateSubscriptionQuoteRequest CustomerVatNumber(string customerVatNumber)
{
m_params.AddOpt("customer[vat_number]", customerVatNumber);
return this;
}
public EditUpdateSubscriptionQuoteRequest CustomerRegisteredForGst(bool customerRegisteredForGst)
{
m_params.AddOpt("customer[registered_for_gst]", customerRegisteredForGst);
return this;
}
public EditUpdateSubscriptionQuoteRequest ContractTermActionAtTermEnd(ContractTerm.ActionAtTermEndEnum contractTermActionAtTermEnd)
{
m_params.AddOpt("contract_term[action_at_term_end]", contractTermActionAtTermEnd);
return this;
}
public EditUpdateSubscriptionQuoteRequest ContractTermCancellationCutoffPeriod(int contractTermCancellationCutoffPeriod)
{
m_params.AddOpt("contract_term[cancellation_cutoff_period]", contractTermCancellationCutoffPeriod);
return this;
}
public EditUpdateSubscriptionQuoteRequest SubscriptionContractTermBillingCycleOnRenewal(int subscriptionContractTermBillingCycleOnRenewal)
{
m_params.AddOpt("subscription[contract_term_billing_cycle_on_renewal]", subscriptionContractTermBillingCycleOnRenewal);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonId(int index, string addonId)
{
m_params.AddOpt("addons[id][" + index + "]", addonId);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonQuantity(int index, int addonQuantity)
{
m_params.AddOpt("addons[quantity][" + index + "]", addonQuantity);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonUnitPrice(int index, int addonUnitPrice)
{
m_params.AddOpt("addons[unit_price][" + index + "]", addonUnitPrice);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonBillingCycles(int index, int addonBillingCycles)
{
m_params.AddOpt("addons[billing_cycles][" + index + "]", addonBillingCycles);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonId(int index, string eventBasedAddonId)
{
m_params.AddOpt("event_based_addons[id][" + index + "]", eventBasedAddonId);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonQuantity(int index, int eventBasedAddonQuantity)
{
m_params.AddOpt("event_based_addons[quantity][" + index + "]", eventBasedAddonQuantity);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonUnitPrice(int index, int eventBasedAddonUnitPrice)
{
m_params.AddOpt("event_based_addons[unit_price][" + index + "]", eventBasedAddonUnitPrice);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonServicePeriodInDays(int index, int eventBasedAddonServicePeriodInDays)
{
m_params.AddOpt("event_based_addons[service_period_in_days][" + index + "]", eventBasedAddonServicePeriodInDays);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonChargeOn(int index, ChargeBee.Models.Enums.ChargeOnEnum eventBasedAddonChargeOn)
{
m_params.AddOpt("event_based_addons[charge_on][" + index + "]", eventBasedAddonChargeOn);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonOnEvent(int index, ChargeBee.Models.Enums.OnEventEnum eventBasedAddonOnEvent)
{
m_params.AddOpt("event_based_addons[on_event][" + index + "]", eventBasedAddonOnEvent);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonChargeOnce(int index, bool eventBasedAddonChargeOnce)
{
m_params.AddOpt("event_based_addons[charge_once][" + index + "]", eventBasedAddonChargeOnce);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonQuantityInDecimal(int index, string addonQuantityInDecimal)
{
m_params.AddOpt("addons[quantity_in_decimal][" + index + "]", addonQuantityInDecimal);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonUnitPriceInDecimal(int index, string addonUnitPriceInDecimal)
{
m_params.AddOpt("addons[unit_price_in_decimal][" + index + "]", addonUnitPriceInDecimal);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonQuantityInDecimal(int index, string eventBasedAddonQuantityInDecimal)
{
m_params.AddOpt("event_based_addons[quantity_in_decimal][" + index + "]", eventBasedAddonQuantityInDecimal);
return this;
}
public EditUpdateSubscriptionQuoteRequest EventBasedAddonUnitPriceInDecimal(int index, string eventBasedAddonUnitPriceInDecimal)
{
m_params.AddOpt("event_based_addons[unit_price_in_decimal][" + index + "]", eventBasedAddonUnitPriceInDecimal);
return this;
}
public EditUpdateSubscriptionQuoteRequest AddonTrialEnd(int index, long addonTrialEnd)
{
m_params.AddOpt("addons[trial_end][" + index + "]", addonTrialEnd);
return this;
}
}
public class UpdateSubscriptionQuoteForItemsRequest : EntityRequest<UpdateSubscriptionQuoteForItemsRequest>
{
public UpdateSubscriptionQuoteForItemsRequest(string url, HttpMethod method)
: base(url, method)
{
}
public UpdateSubscriptionQuoteForItemsRequest Name(string name)
{
m_params.AddOpt("name", name);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest MandatoryItemsToRemove(List<string> mandatoryItemsToRemove)
{
m_params.AddOpt("mandatory_items_to_remove", mandatoryItemsToRemove);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ReplaceItemsList(bool replaceItemsList)
{
m_params.AddOpt("replace_items_list", replaceItemsList);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingCycles(int billingCycles)
{
m_params.AddOpt("billing_cycles", billingCycles);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest TermsToCharge(int termsToCharge)
{
m_params.AddOpt("terms_to_charge", termsToCharge);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ReactivateFrom(long reactivateFrom)
{
m_params.AddOpt("reactivate_from", reactivateFrom);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAlignmentMode(ChargeBee.Models.Enums.BillingAlignmentModeEnum billingAlignmentMode)
{
m_params.AddOpt("billing_alignment_mode", billingAlignmentMode);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest CouponIds(List<string> couponIds)
{
m_params.AddOpt("coupon_ids", couponIds);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ReplaceCouponList(bool replaceCouponList)
{
m_params.AddOpt("replace_coupon_list", replaceCouponList);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ForceTermReset(bool forceTermReset)
{
m_params.AddOpt("force_term_reset", forceTermReset);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest Reactivate(bool reactivate)
{
m_params.AddOpt("reactivate", reactivate);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionId(string subscriptionId)
{
m_params.Add("subscription[id]", subscriptionId);
return this;
}
[Obsolete]
public UpdateSubscriptionQuoteForItemsRequest SubscriptionSetupFee(int subscriptionSetupFee)
{
m_params.AddOpt("subscription[setup_fee]", subscriptionSetupFee);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionStartDate(long subscriptionStartDate)
{
m_params.AddOpt("subscription[start_date]", subscriptionStartDate);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionTrialEnd(long subscriptionTrialEnd)
{
m_params.AddOpt("subscription[trial_end]", subscriptionTrialEnd);
return this;
}
[Obsolete]
public UpdateSubscriptionQuoteForItemsRequest SubscriptionCoupon(string subscriptionCoupon)
{
m_params.AddOpt("subscription[coupon]", subscriptionCoupon);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionAutoCollection(ChargeBee.Models.Enums.AutoCollectionEnum subscriptionAutoCollection)
{
m_params.AddOpt("subscription[auto_collection]", subscriptionAutoCollection);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionOfflinePaymentMethod(ChargeBee.Models.Enums.OfflinePaymentMethodEnum subscriptionOfflinePaymentMethod)
{
m_params.AddOpt("subscription[offline_payment_method]", subscriptionOfflinePaymentMethod);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressFirstName(string billingAddressFirstName)
{
m_params.AddOpt("billing_address[first_name]", billingAddressFirstName);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressLastName(string billingAddressLastName)
{
m_params.AddOpt("billing_address[last_name]", billingAddressLastName);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressEmail(string billingAddressEmail)
{
m_params.AddOpt("billing_address[email]", billingAddressEmail);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressCompany(string billingAddressCompany)
{
m_params.AddOpt("billing_address[company]", billingAddressCompany);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressPhone(string billingAddressPhone)
{
m_params.AddOpt("billing_address[phone]", billingAddressPhone);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressLine1(string billingAddressLine1)
{
m_params.AddOpt("billing_address[line1]", billingAddressLine1);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressLine2(string billingAddressLine2)
{
m_params.AddOpt("billing_address[line2]", billingAddressLine2);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressLine3(string billingAddressLine3)
{
m_params.AddOpt("billing_address[line3]", billingAddressLine3);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressCity(string billingAddressCity)
{
m_params.AddOpt("billing_address[city]", billingAddressCity);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressStateCode(string billingAddressStateCode)
{
m_params.AddOpt("billing_address[state_code]", billingAddressStateCode);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressState(string billingAddressState)
{
m_params.AddOpt("billing_address[state]", billingAddressState);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressZip(string billingAddressZip)
{
m_params.AddOpt("billing_address[zip]", billingAddressZip);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressCountry(string billingAddressCountry)
{
m_params.AddOpt("billing_address[country]", billingAddressCountry);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest BillingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum billingAddressValidationStatus)
{
m_params.AddOpt("billing_address[validation_status]", billingAddressValidationStatus);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest CustomerVatNumber(string customerVatNumber)
{
m_params.AddOpt("customer[vat_number]", customerVatNumber);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest CustomerRegisteredForGst(bool customerRegisteredForGst)
{
m_params.AddOpt("customer[registered_for_gst]", customerRegisteredForGst);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemItemPriceId(int index, string subscriptionItemItemPriceId)
{
m_params.Add("subscription_items[item_price_id][" + index + "]", subscriptionItemItemPriceId);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemQuantity(int index, int subscriptionItemQuantity)
{
m_params.AddOpt("subscription_items[quantity][" + index + "]", subscriptionItemQuantity);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemUnitPrice(int index, int subscriptionItemUnitPrice)
{
m_params.AddOpt("subscription_items[unit_price][" + index + "]", subscriptionItemUnitPrice);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemBillingCycles(int index, int subscriptionItemBillingCycles)
{
m_params.AddOpt("subscription_items[billing_cycles][" + index + "]", subscriptionItemBillingCycles);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemTrialEnd(int index, long subscriptionItemTrialEnd)
{
m_params.AddOpt("subscription_items[trial_end][" + index + "]", subscriptionItemTrialEnd);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemServicePeriodDays(int index, int subscriptionItemServicePeriodDays)
{
m_params.AddOpt("subscription_items[service_period_days][" + index + "]", subscriptionItemServicePeriodDays);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemChargeOnEvent(int index, ChargeBee.Models.Enums.ChargeOnEventEnum subscriptionItemChargeOnEvent)
{
m_params.AddOpt("subscription_items[charge_on_event][" + index + "]", subscriptionItemChargeOnEvent);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemChargeOnce(int index, bool subscriptionItemChargeOnce)
{
m_params.AddOpt("subscription_items[charge_once][" + index + "]", subscriptionItemChargeOnce);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemChargeOnOption(int index, ChargeBee.Models.Enums.ChargeOnOptionEnum subscriptionItemChargeOnOption)
{
m_params.AddOpt("subscription_items[charge_on_option][" + index + "]", subscriptionItemChargeOnOption);
return this;
}
[Obsolete]
public UpdateSubscriptionQuoteForItemsRequest SubscriptionItemItemType(int index, ChargeBee.Models.Enums.ItemTypeEnum subscriptionItemItemType)
{
m_params.AddOpt("subscription_items[item_type][" + index + "]", subscriptionItemItemType);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ItemTierItemPriceId(int index, string itemTierItemPriceId)
{
m_params.AddOpt("item_tiers[item_price_id][" + index + "]", itemTierItemPriceId);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ItemTierStartingUnit(int index, int itemTierStartingUnit)
{
m_params.AddOpt("item_tiers[starting_unit][" + index + "]", itemTierStartingUnit);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ItemTierEndingUnit(int index, int itemTierEndingUnit)
{
m_params.AddOpt("item_tiers[ending_unit][" + index + "]", itemTierEndingUnit);
return this;
}
public UpdateSubscriptionQuoteForItemsRequest ItemTierPrice(int index, int itemTierPrice)
{
m_params.AddOpt("item_tiers[price][" + index + "]", itemTierPrice);
return this;
}
}
public class CreateForOnetimeChargesRequest : EntityRequest<CreateForOnetimeChargesRequest>
{
public CreateForOnetimeChargesRequest(string url, HttpMethod method)
: base(url, method)
{
}
public CreateForOnetimeChargesRequest Name(string name)
{
m_params.AddOpt("name", name);
return this;
}
public CreateForOnetimeChargesRequest CustomerId(string customerId)
{
m_params.Add("customer_id", customerId);
return this;
}
public CreateForOnetimeChargesRequest PoNumber(string poNumber)
{
m_params.AddOpt("po_number", poNumber);
return this;
}
public CreateForOnetimeChargesRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public CreateForOnetimeChargesRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public CreateForOnetimeChargesRequest CurrencyCode(string currencyCode)
{
m_params.AddOpt("currency_code", currencyCode);
return this;
}
public CreateForOnetimeChargesRequest Coupon(string coupon)
{
m_params.AddOpt("coupon", coupon);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public CreateForOnetimeChargesRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public CreateForOnetimeChargesRequest AddonId(int index, string addonId)
{
m_params.AddOpt("addons[id][" + index + "]", addonId);
return this;
}
public CreateForOnetimeChargesRequest AddonQuantity(int index, int addonQuantity)
{
m_params.AddOpt("addons[quantity][" + index + "]", addonQuantity);
return this;
}
public CreateForOnetimeChargesRequest AddonQuantityInDecimal(int index, string addonQuantityInDecimal)
{
m_params.AddOpt("addons[quantity_in_decimal][" + index + "]", addonQuantityInDecimal);
return this;
}
public CreateForOnetimeChargesRequest AddonUnitPrice(int index, int addonUnitPrice)
{
m_params.AddOpt("addons[unit_price][" + index + "]", addonUnitPrice);
return this;
}
public CreateForOnetimeChargesRequest AddonUnitPriceInDecimal(int index, string addonUnitPriceInDecimal)
{
m_params.AddOpt("addons[unit_price_in_decimal][" + index + "]", addonUnitPriceInDecimal);
return this;
}
public CreateForOnetimeChargesRequest AddonServicePeriod(int index, int addonServicePeriod)
{
m_params.AddOpt("addons[service_period][" + index + "]", addonServicePeriod);
return this;
}
public CreateForOnetimeChargesRequest ChargeAmount(int index, int chargeAmount)
{
m_params.AddOpt("charges[amount][" + index + "]", chargeAmount);
return this;
}
public CreateForOnetimeChargesRequest ChargeAmountInDecimal(int index, string chargeAmountInDecimal)
{
m_params.AddOpt("charges[amount_in_decimal][" + index + "]", chargeAmountInDecimal);
return this;
}
public CreateForOnetimeChargesRequest ChargeDescription(int index, string chargeDescription)
{
m_params.AddOpt("charges[description][" + index + "]", chargeDescription);
return this;
}
public CreateForOnetimeChargesRequest ChargeAvalaraSaleType(int index, ChargeBee.Models.Enums.AvalaraSaleTypeEnum chargeAvalaraSaleType)
{
m_params.AddOpt("charges[avalara_sale_type][" + index + "]", chargeAvalaraSaleType);
return this;
}
public CreateForOnetimeChargesRequest ChargeAvalaraTransactionType(int index, int chargeAvalaraTransactionType)
{
m_params.AddOpt("charges[avalara_transaction_type][" + index + "]", chargeAvalaraTransactionType);
return this;
}
public CreateForOnetimeChargesRequest ChargeAvalaraServiceType(int index, int chargeAvalaraServiceType)
{
m_params.AddOpt("charges[avalara_service_type][" + index + "]", chargeAvalaraServiceType);
return this;
}
public CreateForOnetimeChargesRequest ChargeServicePeriod(int index, int chargeServicePeriod)
{
m_params.AddOpt("charges[service_period][" + index + "]", chargeServicePeriod);
return this;
}
}
public class CreateForChargeItemsAndChargesRequest : EntityRequest<CreateForChargeItemsAndChargesRequest>
{
public CreateForChargeItemsAndChargesRequest(string url, HttpMethod method)
: base(url, method)
{
}
public CreateForChargeItemsAndChargesRequest Name(string name)
{
m_params.AddOpt("name", name);
return this;
}
public CreateForChargeItemsAndChargesRequest CustomerId(string customerId)
{
m_params.Add("customer_id", customerId);
return this;
}
public CreateForChargeItemsAndChargesRequest PoNumber(string poNumber)
{
m_params.AddOpt("po_number", poNumber);
return this;
}
public CreateForChargeItemsAndChargesRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public CreateForChargeItemsAndChargesRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public CreateForChargeItemsAndChargesRequest CurrencyCode(string currencyCode)
{
m_params.AddOpt("currency_code", currencyCode);
return this;
}
public CreateForChargeItemsAndChargesRequest Coupon(string coupon)
{
m_params.AddOpt("coupon", coupon);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public CreateForChargeItemsAndChargesRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemPriceItemPriceId(int index, string itemPriceItemPriceId)
{
m_params.AddOpt("item_prices[item_price_id][" + index + "]", itemPriceItemPriceId);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemPriceQuantity(int index, int itemPriceQuantity)
{
m_params.AddOpt("item_prices[quantity][" + index + "]", itemPriceQuantity);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemPriceUnitPrice(int index, int itemPriceUnitPrice)
{
m_params.AddOpt("item_prices[unit_price][" + index + "]", itemPriceUnitPrice);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemPriceDateFrom(int index, long itemPriceDateFrom)
{
m_params.AddOpt("item_prices[date_from][" + index + "]", itemPriceDateFrom);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemPriceDateTo(int index, long itemPriceDateTo)
{
m_params.AddOpt("item_prices[date_to][" + index + "]", itemPriceDateTo);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemTierItemPriceId(int index, string itemTierItemPriceId)
{
m_params.AddOpt("item_tiers[item_price_id][" + index + "]", itemTierItemPriceId);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemTierStartingUnit(int index, int itemTierStartingUnit)
{
m_params.AddOpt("item_tiers[starting_unit][" + index + "]", itemTierStartingUnit);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemTierEndingUnit(int index, int itemTierEndingUnit)
{
m_params.AddOpt("item_tiers[ending_unit][" + index + "]", itemTierEndingUnit);
return this;
}
public CreateForChargeItemsAndChargesRequest ItemTierPrice(int index, int itemTierPrice)
{
m_params.AddOpt("item_tiers[price][" + index + "]", itemTierPrice);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeAmount(int index, int chargeAmount)
{
m_params.AddOpt("charges[amount][" + index + "]", chargeAmount);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeAmountInDecimal(int index, string chargeAmountInDecimal)
{
m_params.AddOpt("charges[amount_in_decimal][" + index + "]", chargeAmountInDecimal);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeDescription(int index, string chargeDescription)
{
m_params.AddOpt("charges[description][" + index + "]", chargeDescription);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeAvalaraSaleType(int index, ChargeBee.Models.Enums.AvalaraSaleTypeEnum chargeAvalaraSaleType)
{
m_params.AddOpt("charges[avalara_sale_type][" + index + "]", chargeAvalaraSaleType);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeAvalaraTransactionType(int index, int chargeAvalaraTransactionType)
{
m_params.AddOpt("charges[avalara_transaction_type][" + index + "]", chargeAvalaraTransactionType);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeAvalaraServiceType(int index, int chargeAvalaraServiceType)
{
m_params.AddOpt("charges[avalara_service_type][" + index + "]", chargeAvalaraServiceType);
return this;
}
public CreateForChargeItemsAndChargesRequest ChargeServicePeriod(int index, int chargeServicePeriod)
{
m_params.AddOpt("charges[service_period][" + index + "]", chargeServicePeriod);
return this;
}
}
public class EditOneTimeQuoteRequest : EntityRequest<EditOneTimeQuoteRequest>
{
public EditOneTimeQuoteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public EditOneTimeQuoteRequest PoNumber(string poNumber)
{
m_params.AddOpt("po_number", poNumber);
return this;
}
public EditOneTimeQuoteRequest Notes(string notes)
{
m_params.AddOpt("notes", notes);
return this;
}
public EditOneTimeQuoteRequest ExpiresAt(long expiresAt)
{
m_params.AddOpt("expires_at", expiresAt);
return this;
}
public EditOneTimeQuoteRequest CurrencyCode(string currencyCode)
{
m_params.AddOpt("currency_code", currencyCode);
return this;
}
public EditOneTimeQuoteRequest Coupon(string coupon)
{
m_params.AddOpt("coupon", coupon);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressFirstName(string shippingAddressFirstName)
{
m_params.AddOpt("shipping_address[first_name]", shippingAddressFirstName);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressLastName(string shippingAddressLastName)
{
m_params.AddOpt("shipping_address[last_name]", shippingAddressLastName);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressEmail(string shippingAddressEmail)
{
m_params.AddOpt("shipping_address[email]", shippingAddressEmail);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressCompany(string shippingAddressCompany)
{
m_params.AddOpt("shipping_address[company]", shippingAddressCompany);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressPhone(string shippingAddressPhone)
{
m_params.AddOpt("shipping_address[phone]", shippingAddressPhone);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressLine1(string shippingAddressLine1)
{
m_params.AddOpt("shipping_address[line1]", shippingAddressLine1);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressLine2(string shippingAddressLine2)
{
m_params.AddOpt("shipping_address[line2]", shippingAddressLine2);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressLine3(string shippingAddressLine3)
{
m_params.AddOpt("shipping_address[line3]", shippingAddressLine3);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressCity(string shippingAddressCity)
{
m_params.AddOpt("shipping_address[city]", shippingAddressCity);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressStateCode(string shippingAddressStateCode)
{
m_params.AddOpt("shipping_address[state_code]", shippingAddressStateCode);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressState(string shippingAddressState)
{
m_params.AddOpt("shipping_address[state]", shippingAddressState);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressZip(string shippingAddressZip)
{
m_params.AddOpt("shipping_address[zip]", shippingAddressZip);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressCountry(string shippingAddressCountry)
{
m_params.AddOpt("shipping_address[country]", shippingAddressCountry);
return this;
}
public EditOneTimeQuoteRequest ShippingAddressValidationStatus(ChargeBee.Models.Enums.ValidationStatusEnum shippingAddressValidationStatus)
{
m_params.AddOpt("shipping_address[validation_status]", shippingAddressValidationStatus);
return this;
}
public EditOneTimeQuoteRequest AddonId(int index, string addonId)
{
m_params.AddOpt("addons[id][" + index + "]", addonId);
return this;
}
public EditOneTimeQuoteRequest AddonQuantity(int index, int addonQuantity)
{
m_params.AddOpt("addons[quantity][" + index + "]", addonQuantity);
return this;
}
public EditOneTimeQuoteRequest AddonQuantityInDecimal(int index, string addonQuantityInDecimal)
{
m_params.AddOpt("addons[quantity_in_decimal][" + index + "]", addonQuantityInDecimal);
return this;
}
public EditOneTimeQuoteRequest AddonUnitPrice(int index, int addonUnitPrice)
{
m_params.AddOpt("addons[unit_price][" + index + "]", addonUnitPrice);
return this;
}
public EditOneTimeQuoteRequest AddonUnitPriceInDecimal(int index, string addonUnitPriceInDecimal)
{
m_params.AddOpt("addons[unit_price_in_decimal][" + index + "]", addonUnitPriceInDecimal);
return this;
}
public EditOneTimeQuoteRequest AddonServicePeriod(int index, int addonServicePeriod)
{
m_params.AddOpt("addons[service_period][" + index + "]", addonServicePeriod);
return this;
}
public EditOneTimeQuoteRequest ChargeAmount(int index, int chargeAmount)
{
m_params.AddOpt("charges[amount][" + index + "]", chargeAmount);
return this;
}
public EditOneTimeQuoteRequest ChargeAmountInDecimal(int index, string chargeAmountInDecimal)
{
m_params.AddOpt("charges[amount_in_decimal][" + index + "]", chargeAmountInDecimal);
return this;
}
public EditOneTimeQuoteRequest ChargeDescription(int index, string chargeDescription)
{
m_params.AddOpt("charges[description][" + index + "]", chargeDescription);
return this;
}
public EditOneTimeQuoteRequest ChargeAvalaraSaleType(int index, ChargeBee.Models.Enums.AvalaraSaleTypeEnum chargeAvalaraSaleType)
{
m_params.AddOpt("charges[avalara_sale_type][" + index + "]", chargeAvalaraSaleType);
return this;
}
public EditOneTimeQuoteRequest ChargeAvalaraTransactionType(int index, int chargeAvalaraTransactionType)
{
m_params.AddOpt("charges[avalara_transaction_type][" + index + "]", chargeAvalaraTransactionType);
return this;
}
public EditOneTimeQuoteRequest ChargeAvalaraServiceType(int index, int chargeAvalaraServiceType)
{
m_params.AddOpt("charges[avalara_service_type][" + index + "]", chargeAvalaraServiceType);
return this;
}
public EditOneTimeQuoteRequest ChargeServicePeriod(int index, int chargeServicePeriod)
{
m_params.AddOpt("charges[service_period][" + index + "]", chargeServicePeriod);
return this;
}
}
public class QuoteListRequest : ListRequestBase<QuoteListRequest>
{
public QuoteListRequest(string url)
: base(url)
{
}
public QuoteListRequest IncludeDeleted(bool includeDeleted)
{
m_params.AddOpt("include_deleted", includeDeleted);
return this;
}
public StringFilter<QuoteListRequest> Id()
{
return new StringFilter<QuoteListRequest>("id", this).SupportsMultiOperators(true);
}
public StringFilter<QuoteListRequest> CustomerId()
{
return new StringFilter<QuoteListRequest>("customer_id", this).SupportsMultiOperators(true);
}
public StringFilter<QuoteListRequest> SubscriptionId()
{
return new StringFilter<QuoteListRequest>("subscription_id", this).SupportsMultiOperators(true).SupportsPresenceOperator(true);
}
public EnumFilter<Quote.StatusEnum, QuoteListRequest> Status()
{
return new EnumFilter<Quote.StatusEnum, QuoteListRequest>("status", this);
}
public TimestampFilter<QuoteListRequest> Date()
{
return new TimestampFilter<QuoteListRequest>("date", this);
}
public TimestampFilter<QuoteListRequest> UpdatedAt()
{
return new TimestampFilter<QuoteListRequest>("updated_at", this);
}
public QuoteListRequest SortByDate(SortOrderEnum order) {
m_params.AddOpt("sort_by["+order.ToString().ToLower()+"]","date");
return this;
}
}
public class ConvertRequest : EntityRequest<ConvertRequest>
{
public ConvertRequest(string url, HttpMethod method)
: base(url, method)
{
}
public ConvertRequest SubscriptionId(string subscriptionId)
{
m_params.AddOpt("subscription[id]", subscriptionId);
return this;
}
public ConvertRequest SubscriptionAutoCollection(ChargeBee.Models.Enums.AutoCollectionEnum subscriptionAutoCollection)
{
m_params.AddOpt("subscription[auto_collection]", subscriptionAutoCollection);
return this;
}
public ConvertRequest SubscriptionPoNumber(string subscriptionPoNumber)
{
m_params.AddOpt("subscription[po_number]", subscriptionPoNumber);
return this;
}
}
public class UpdateStatusRequest : EntityRequest<UpdateStatusRequest>
{
public UpdateStatusRequest(string url, HttpMethod method)
: base(url, method)
{
}
public UpdateStatusRequest Status(StatusEnum status)
{
m_params.Add("status", status);
return this;
}
public UpdateStatusRequest Comment(string comment)
{
m_params.AddOpt("comment", comment);
return this;
}
}
public class ExtendExpiryDateRequest : EntityRequest<ExtendExpiryDateRequest>
{
public ExtendExpiryDateRequest(string url, HttpMethod method)
: base(url, method)
{
}
public ExtendExpiryDateRequest ValidTill(long validTill)
{
m_params.Add("valid_till", validTill);
return this;
}
}
public class DeleteRequest : EntityRequest<DeleteRequest>
{
public DeleteRequest(string url, HttpMethod method)
: base(url, method)
{
}
public DeleteRequest Comment(string comment)
{
m_params.AddOpt("comment", comment);
return this;
}
}
public class PdfRequest : EntityRequest<PdfRequest>
{
public PdfRequest(string url, HttpMethod method)
: base(url, method)
{
}
public PdfRequest ConsolidatedView(bool consolidatedView)
{
m_params.AddOpt("consolidated_view", consolidatedView);
return this;
}
public PdfRequest DispositionType(ChargeBee.Models.Enums.DispositionTypeEnum dispositionType)
{
m_params.AddOpt("disposition_type", dispositionType);
return this;
}
}
#endregion
public enum StatusEnum
{
UnKnown, /*Indicates unexpected value for this enum. You can get this when there is a
dotnet-client version incompatibility. We suggest you to upgrade to the latest version */
[EnumMember(Value = "open")]
Open,
[EnumMember(Value = "accepted")]
Accepted,
[EnumMember(Value = "declined")]
Declined,
[EnumMember(Value = "invoiced")]
Invoiced,
[EnumMember(Value = "closed")]
Closed,
}
public enum OperationTypeEnum
{
UnKnown, /*Indicates unexpected value for this enum. You can get this when there is a
dotnet-client version incompatibility. We suggest you to upgrade to the latest version */
[EnumMember(Value = "create_subscription_for_customer")]
CreateSubscriptionForCustomer,
[EnumMember(Value = "change_subscription")]
ChangeSubscription,
[EnumMember(Value = "onetime_invoice")]
OnetimeInvoice,
}
#region Subclasses
public class QuoteLineItem : Resource
{
public enum EntityTypeEnum
{
UnKnown, /*Indicates unexpected value for this enum. You can get this when there is a
dotnet-client version incompatibility. We suggest you to upgrade to the latest version */
[EnumMember(Value = "plan_setup")]
PlanSetup,
[EnumMember(Value = "plan")]
Plan,
[EnumMember(Value = "addon")]
Addon,
[EnumMember(Value = "adhoc")]
Adhoc,
[EnumMember(Value = "plan_item_price")]
PlanItemPrice,
[EnumMember(Value = "addon_item_price")]
AddonItemPrice,
[EnumMember(Value = "charge_item_price")]
ChargeItemPrice,
}
public string Id() {
return GetValue<string>("id", false);
}
public string SubscriptionId() {
return GetValue<string>("subscription_id", false);
}
public DateTime DateFrom() {
return (DateTime)GetDateTime("date_from", true);
}
public DateTime DateTo() {
return (DateTime)GetDateTime("date_to", true);
}
public int UnitAmount() {
return GetValue<int>("unit_amount", true);
}
public int? Quantity() {
return GetValue<int?>("quantity", false);
}
public int? Amount() {
return GetValue<int?>("amount", false);
}
public PricingModelEnum? PricingModel() {
return GetEnum<PricingModelEnum>("pricing_model", false);
}
public bool IsTaxed() {
return GetValue<bool>("is_taxed", true);
}
public int? TaxAmount() {
return GetValue<int?>("tax_amount", false);
}
public double? TaxRate() {
return GetValue<double?>("tax_rate", false);
}
public string UnitAmountInDecimal() {
return GetValue<string>("unit_amount_in_decimal", false);
}
public string QuantityInDecimal() {
return GetValue<string>("quantity_in_decimal", false);
}
public string AmountInDecimal() {
return GetValue<string>("amount_in_decimal", false);
}
public int? DiscountAmount() {
return GetValue<int?>("discount_amount", false);
}
public int? ItemLevelDiscountAmount() {
return GetValue<int?>("item_level_discount_amount", false);
}
public string Description() {
return GetValue<string>("description", true);
}
public string EntityDescription() {
return GetValue<string>("entity_description", true);
}
public EntityTypeEnum EntityType() {
return GetEnum<EntityTypeEnum>("entity_type", true);
}
public TaxExemptReasonEnum? TaxExemptReason() {
return GetEnum<TaxExemptReasonEnum>("tax_exempt_reason", false);
}
public string EntityId() {
return GetValue<string>("entity_id", false);
}
public string CustomerId() {
return GetValue<string>("customer_id", false);
}
}
public class QuoteDiscount : Resource
{
public enum EntityTypeEnum
{
UnKnown, /*Indicates unexpected value for this enum. You can get this when there is a
dotnet-client version incompatibility. We suggest you to upgrade to the latest version */
[EnumMember(Value = "item_level_coupon")]
ItemLevelCoupon,
[EnumMember(Value = "document_level_coupon")]
DocumentLevelCoupon,
[EnumMember(Value = "promotional_credits")]
PromotionalCredits,
[EnumMember(Value = "prorated_credits")]
ProratedCredits,
}
public int Amount() {
return GetValue<int>("amount", true);
}
public string Description() {
return GetValue<string>("description", false);
}
public EntityTypeEnum EntityType() {
return GetEnum<EntityTypeEnum>("entity_type", true);
}
public string EntityId() {
return GetValue<string>("entity_id", false);
}
}
public class QuoteLineItemDiscount : Resource
{
public enum DiscountTypeEnum
{
UnKnown, /*Indicates unexpected value for this enum. You can get this when there is a
dotnet-client version incompatibility. We suggest you to upgrade to the latest version */
[EnumMember(Value = "item_level_coupon")]
ItemLevelCoupon,
[EnumMember(Value = "document_level_coupon")]
DocumentLevelCoupon,
[EnumMember(Value = "promotional_credits")]
PromotionalCredits,
[EnumMember(Value = "prorated_credits")]
ProratedCredits,
}
public string LineItemId() {
return GetValue<string>("line_item_id", true);
}
public DiscountTypeEnum DiscountType() {
return GetEnum<DiscountTypeEnum>("discount_type", true);
}
public string CouponId() {
return GetValue<string>("coupon_id", false);
}
public int DiscountAmount() {
return GetValue<int>("discount_amount", true);
}
}
public class QuoteTax : Resource
{
public string Name() {
return GetValue<string>("name", true);
}
public int Amount() {
return GetValue<int>("amount", true);
}
public string Description() {
return GetValue<string>("description", false);
}
}
public class QuoteLineItemTax : Resource
{
public string LineItemId() {
return GetValue<string>("line_item_id", false);
}
public string TaxName() {
return GetValue<string>("tax_name", true);
}
public double TaxRate() {
return GetValue<double>("tax_rate", true);
}
public bool? IsPartialTaxApplied() {
return GetValue<bool?>("is_partial_tax_applied", false);
}
public bool? IsNonComplianceTax() {
return GetValue<bool?>("is_non_compliance_tax", false);
}
public int TaxableAmount() {
return GetValue<int>("taxable_amount", true);
}
public int TaxAmount() {
return GetValue<int>("tax_amount", true);
}
public TaxJurisTypeEnum? TaxJurisType() {
return GetEnum<TaxJurisTypeEnum>("tax_juris_type", false);
}
public string TaxJurisName() {
return GetValue<string>("tax_juris_name", false);
}
public string TaxJurisCode() {
return GetValue<string>("tax_juris_code", false);
}
public int? TaxAmountInLocalCurrency() {
return GetValue<int?>("tax_amount_in_local_currency", false);
}
public string LocalCurrencyCode() {
return GetValue<string>("local_currency_code", false);
}
}
public class QuoteShippingAddress : Resource
{
public string FirstName() {
return GetValue<string>("first_name", false);
}
public string LastName() {
return GetValue<string>("last_name", false);
}
public string Email() {
return GetValue<string>("email", false);
}
public string Company() {
return GetValue<string>("company", false);
}
public string Phone() {
return GetValue<string>("phone", false);
}
public string Line1() {
return GetValue<string>("line1", false);
}
public string Line2() {
return GetValue<string>("line2", false);
}
public string Line3() {
return GetValue<string>("line3", false);
}
public string City() {
return GetValue<string>("city", false);
}
public string StateCode() {
return GetValue<string>("state_code", false);
}
public string State() {
return GetValue<string>("state", false);
}
public string Country() {
return GetValue<string>("country", false);
}
public string Zip() {
return GetValue<string>("zip", false);
}
public ValidationStatusEnum? ValidationStatus() {
return GetEnum<ValidationStatusEnum>("validation_status", false);
}
}
public class QuoteBillingAddress : Resource
{
public string FirstName() {
return GetValue<string>("first_name", false);
}
public string LastName() {
return GetValue<string>("last_name", false);
}
public string Email() {
return GetValue<string>("email", false);
}
public string Company() {
return GetValue<string>("company", false);
}
public string Phone() {
return GetValue<string>("phone", false);
}
public string Line1() {
return GetValue<string>("line1", false);
}
public string Line2() {
return GetValue<string>("line2", false);
}
public string Line3() {
return GetValue<string>("line3", false);
}
public string City() {
return GetValue<string>("city", false);
}
public string StateCode() {
return GetValue<string>("state_code", false);
}
public string State() {
return GetValue<string>("state", false);
}
public string Country() {
return GetValue<string>("country", false);
}
public string Zip() {
return GetValue<string>("zip", false);
}
public ValidationStatusEnum? ValidationStatus() {
return GetEnum<ValidationStatusEnum>("validation_status", false);
}
}
#endregion
}
}
| 46.231379 | 174 | 0.605224 | [
"MIT"
] | cdekkerpossibilit/chargebee-dotnet | ChargeBee/Models/Quote.cs | 145,860 | C# |
using Selenium.Tests.Internals;
using A = NUnit.Framework.Assert;
using SetUp = NUnit.Framework.SetUpAttribute;
using TestCase = NUnit.Framework.TestCaseAttribute;
using TestFixture = NUnit.Framework.TestFixtureAttribute;
namespace Selenium.Tests {
[TestFixture(Browser.Firefox)]
[TestFixture(Browser.Gecko)]
[TestFixture(Browser.Chrome)]
[TestFixture(Browser.Edge)]
/*
[TestFixture(Browser.Opera)]
[TestFixture(Browser.IE)]
[TestFixture(Browser.PhantomJS)]
*/
class TS_Window : BaseBrowsers {
public TS_Window(Browser browser)
: base(browser) { }
[SetUp]
public void SetUp() {
driver.Get("/win1.html");
}
[TestCase]
public void ShouldDisplayMaximized() {
var win = driver.Window;
win.SetSize(800, 600);
win.Maximize();
var size = win.Size();
A.Greater(size.Width, 900);
A.Greater(size.Height, 700);
}
[TestCase]
public void ShouldGetAndSetSize() {
var win = driver.Window;
win.SetSize(800, 600);
var size = win.Size();
A.AreEqual(800, size.Width);
A.AreEqual(600, size.Height);
}
[TestCase]
[IgnoreFixture(Browser.PhantomJS, "Not supported")]
public void ShouldGetAndSetPosition() {
var win = driver.Window;
win.SetPosition(17, 23);
var pos = win.Position();
A.AreEqual(17, pos.X);
A.AreEqual(23, pos.Y);
}
[TestCase]
public void ShouldGetTitle() {
var win = driver.Window;
A.AreEqual("Window1", win.Title);
}
[TestCase]
[IgnoreFixture(Browser.PhantomJS, "Not supported")]
[IgnoreFixture(Browser.Opera, "Issue #14")]
public void ShouldCloseWindow() {
var win1 = driver.Window;
driver.FindElementByLinkText("Window2").Click();
driver.SwitchToNextWindow().Close();
win1.Activate();
A.AreEqual(1, driver.Windows.Count);
}
}
}
| 27.564103 | 60 | 0.565581 | [
"BSD-3-Clause"
] | zc2com/SeleniumBasic | Selenium.Tests/TS_Window.cs | 2,152 | C# |
/**
* @file ShaderReferenceOther.cs
* @author Hongwei Li(taecg@qq.com)
* @created 2018-12-30
* @updated 2018-12-30
*
* @brief Shader中的其它语法
*/
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace taecg.tools.shaderReference
{
public class ShaderReferenceOther : EditorWindow
{
#region 数据成员
private Vector2 scrollPos;
#endregion
public void DrawMainGUI ()
{
scrollPos = EditorGUILayout.BeginScrollView (scrollPos);
ShaderReferenceUtil.DrawTitle ("Other");
ShaderReferenceUtil.DrawOneContent ("Category{}", "定义一组所有SubShader共享的命令,位于SubShader外面。\n");
ShaderReferenceUtil.DrawOneContent ("LOD", "Shader LOD,可利用脚本来控制LOD级别,通常用于不同配置显示不同的SubShader。");
ShaderReferenceUtil.DrawOneContent ("Fallback \"name\"", "备胎,当Shader中没有任何SubShader可执行时,则执行FallBack。默认值为Off,表示没有备胎。\n示例:FallBack \"Diffuse\"");
ShaderReferenceUtil.DrawOneContent ("CustomEditor \"name\"", "自定义材质面板,name为自定义的脚本名称。可利用此功能对材质面板进行个性化自定义。");
ShaderReferenceUtil.DrawOneContent ("Name \"MyPassName\"", "给当前Pass指定名称,以便利用UsePass进行调用。");
ShaderReferenceUtil.DrawOneContent ("UsePass \"Shader/NAME\"", "调用其它Shader中的Pass,注意Pass的名称要全部大写!Shader的路径也要写全,以便能找到具体是哪个Shader的哪个Pass。另外加了UsePass后,也要注意相应的Properties要自行添加。");
ShaderReferenceUtil.DrawOneContent ("GrabPass", "GrabPass{} 抓取当前屏幕存储到_GrabTexture中,每个有此命令的Shader都会每帧执行。\nGrabPass { \"TextureName\" } 抓取当前屏幕存储到自定义的TextureName中,每帧中只有第一个拥有此命令的Shader执行一次。\nGrabPass也支持Name与Tags。");
EditorGUILayout.EndScrollView ();
}
}
}
#endif | 44.342105 | 223 | 0.704451 | [
"MIT"
] | getker/UnityShaderLibrary | Assets/taecgLibrary/ShaderReference/Editor/ShaderReferenceOther.cs | 2,211 | C# |
using System.Linq;
namespace Xpand.Extensions.XAF.AppDomainExtensions{
public static partial class AppDomainExtensions{
private static object _errorHandlling;
private static System.Type _errorHandlingType;
public static object ErrorHandling(this IXAFAppDomain xafAppDomain){
_errorHandlingType ??= xafAppDomain.DXWebAssembly()?.GetTypes()
.First(type => type.FullName == "DevExpress.ExpressApp.Web.ErrorHandling");
return _errorHandlling ??= _errorHandlingType?.GetProperty("Instance")?.GetValue(null);
}
}
} | 45.384615 | 99 | 0.70678 | [
"Apache-2.0"
] | JTOne123/DevExpress.XAF | src/Extensions/Xpand.Extensions.XAF/AppDomainExtensions/AppDomainExtensions.cs | 592 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using NuKeeper.Inspection.RepositoryInspection;
using System.Threading.Tasks;
using NuKeeper.Abstractions;
using NuKeeper.Abstractions.Configuration;
using NuKeeper.Abstractions.Formats;
using NuKeeper.Abstractions.Logging;
namespace NuKeeper.Update.Selection
{
public class UpdateSelection : IUpdateSelection
{
private readonly INuKeeperLogger _logger;
private FilterSettings _settings;
private DateTime? _maxPublishedDate = null;
public UpdateSelection(INuKeeperLogger logger)
{
_logger = logger;
}
public async Task<IReadOnlyCollection<PackageUpdateSet>> Filter(
IReadOnlyCollection<PackageUpdateSet> candidates,
FilterSettings settings,
Func<PackageUpdateSet, Task<bool>> remoteCheck)
{
_settings = settings;
if (settings.MinimumAge != TimeSpan.Zero)
{
_maxPublishedDate = DateTime.UtcNow.Subtract(settings.MinimumAge);
}
var filtered = await ApplyFilters(candidates, remoteCheck);
var capped = filtered
.Take(settings.MaxPackageUpdates)
.ToList();
LogPackageCounts(candidates.Count, filtered.Count, capped.Count);
return capped;
}
private async Task<IReadOnlyCollection<PackageUpdateSet>> ApplyFilters(
IReadOnlyCollection<PackageUpdateSet> all,
Func<PackageUpdateSet, Task<bool>> remoteCheck)
{
var filteredLocally = all
.Where(MatchesMinAge)
.ToList();
if (filteredLocally.Count < all.Count)
{
var agoFormat = TimeSpanFormat.Ago(_settings.MinimumAge);
_logger.Normal($"Filtered by minimum package age '{agoFormat}' from {all.Count} to {filteredLocally.Count}");
}
var remoteFiltered = await ApplyRemoteFilter(filteredLocally, remoteCheck);
if (remoteFiltered.Count < filteredLocally.Count)
{
_logger.Normal($"Filtered by remote branch check branch from {filteredLocally.Count} to {remoteFiltered.Count}");
}
return remoteFiltered;
}
public static async Task<IReadOnlyCollection<PackageUpdateSet>> ApplyRemoteFilter(
IEnumerable<PackageUpdateSet> packageUpdateSets,
Func<PackageUpdateSet, Task<bool>> remoteCheck)
{
var results = await packageUpdateSets
.WhereAsync(async p => await remoteCheck(p));
return results.ToList();
}
private void LogPackageCounts(int candidates, int filtered, int capped)
{
var message = $"Selection of package updates: {candidates} candidates";
if (filtered < candidates)
{
message += $", filtered to {filtered}";
}
if (capped < filtered)
{
message += $", capped at {capped}";
}
_logger.Minimal(message);
}
private bool MatchesMinAge(PackageUpdateSet packageUpdateSet)
{
if (!_maxPublishedDate.HasValue)
{
return true;
}
var published = packageUpdateSet.Selected.Published;
if (!published.HasValue)
{
return true;
}
return published.Value.UtcDateTime <= _maxPublishedDate.Value;
}
}
}
| 32.008772 | 129 | 0.600713 | [
"Apache-2.0"
] | sanderaernouts/NuKeeper | NuKeeper.Update/Selection/UpdateSelection.cs | 3,649 | C# |
// ***********************************************************************
// Assembly : HalconTemplateDemo Author : Resolution Technology, Inc.
// Created : 06-15-2017
// Last Modified On : 06-15-2017
// ***********************************************************************
// <copyright file="ICameraCalibrationProcessor.cs" company="Resolution Technology, Inc.">
// Copyright © 2016, 2017
// </copyright>
// <summary>
// </summary>
// ***********************************************************************
using HalconDotNet;
namespace HalconTemplateDemo.Models
{
/// <summary>
/// Interface ICameraCalibrationProcessor
/// </summary>
public interface ICameraCalibrationProcessor
{
/// <summary>
/// Gets or sets a value indicating whether calibration images set.
/// </summary>
/// <value><c>true</c> if calibration images set; otherwise, <c>false</c>.</value>
bool AreCalibrationImagesSet { get; set; }
/// <summary>
/// Gets or sets a value indicating whether calibration parameters set.
/// </summary>
/// <value><c>true</c> if calibration parameters set; otherwise, <c>false</c>.</value>
bool AreCalibrationParametersSet { get; set; }
/// <summary>
/// Gets or sets a value indicating whether calibration is done.
/// </summary>
/// <value><c>true</c> if calibration is done; otherwise, <c>false</c>.</value>
bool CalibrationIsDone { get; set; }
/// <summary>
/// Gets or sets the calibration map.
/// </summary>
/// <value>The calibration map.</value>
HImage CalibrationMap { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the calibration map is present.
/// </summary>
/// <value><c>true</c> if the calibration map is present; otherwise, <c>false</c>.</value>
bool IsCalibrationMapPresent { get; set; }
/// <summary>
/// Gets or sets a value indicating whether a rectified test image is present.
/// </summary>
/// <value><c>true</c> if whether a rectified test image is present; otherwise, <c>false</c>.</value>
bool IsRectifiedTestImagePresent { get; set; }
/// <summary>
/// Gets or sets the rectified test image.
/// </summary>
/// <value>The rectified test image.</value>
HImage RectifiedTestImage { get; set; }
/// <summary>
/// Calibrates the specified image.
/// </summary>
/// <param name="imageWidth">Width of the image.</param>
/// <param name="imageHeight">Height of the image.</param>
/// <param name="rectifiedImageWidth">Width of the rectified image.</param>
/// <param name="rectifiedImageHeight">Height of the rectified image.</param>
/// <param name="calibratedScale">The calibrated scale.</param>
/// <param name="imageScaling">A scaling factor applied to the rectified image size to adjust the resolution.
/// Also used to back-convert rectified coordinates to their rectified values.</param>
/// <param name="preserveResolution">A boolean value indicating whether to preserve the
/// original image resolution in the rectified image.</param>
/// <param name="lockAspectRatio">A boolean value indicating whether the rectified image
/// width and height are locked to the original aspect ratio.</param>
/// <param name="cancelZRotation">A boolean value indicating whether the Z rotation of the
/// world pose should be canceled for the rectified image.</param>
/// <param name="worldPoseIndex">Index of the world pose.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult Calibrate(
int imageWidth,
int imageHeight,
int rectifiedImageWidth,
int rectifiedImageHeight,
double calibratedScale,
double imageScaling,
bool preserveResolution,
bool lockAspectRatio,
bool cancelZRotation,
int worldPoseIndex);
/// <summary>
/// Loads calibration images.
/// </summary>
/// <param name="folderName">Name of the folder containing the images.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult LoadCalibrationImages(string folderName);
/// <summary>
/// Loads a calibration map.
/// </summary>
/// <param name="fileName">Name of the file.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult LoadCalibrationMap(string fileName);
/// <summary>
/// The default Process method.
/// </summary>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult Process();
/// <summary>
/// Processes an acquired calibration image.
/// </summary>
/// <param name="image">The image.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult ProcessAcquiredCalibrationImage(HImage image);
/// <summary>
/// Rectifies an image.
/// </summary>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult RectifyImage();
/// <summary>
/// Resets the calibration images.
/// </summary>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult ResetCalibrationImages();
/// <summary>
/// Saves the calibration map.
/// </summary>
/// <param name="fileName">Name of the file into which to save the map.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult SaveCalibrationMap(string fileName);
/// <summary>
/// Saves the rectified test image.
/// </summary>
/// <param name="fileName">Name of the file into which to save the rectified test image.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult SaveRectifiedTestImage(string fileName);
/// <summary>
/// Sets the initial parameters.
/// </summary>
/// <param name="cameraType">Type of the camera.</param>
/// <param name="focalLength">Focal length.</param>
/// <param name="imageWidth">Width of the image.</param>
/// <param name="imageHeight">Height of the image.</param>
/// <param name="sensorSizeX">The sensor size in the x direction.</param>
/// <param name="sensorSizeY">The sensor size in the y direction.</param>
/// <param name="rotation">The rotation.</param>
/// <param name="tilt">The tilt.</param>
/// <param name="halconCalibrationPlateName">Name of the halcon calibration plate.</param>
/// <returns>A ProcessingResult instance.</returns>
ProcessingResult SetInitialParameters(string cameraType, double focalLength, int imageWidth, int imageHeight, double sensorSizeX, double sensorSizeY, double rotation, double tilt, string halconCalibrationPlateName);
}
} | 46.074074 | 225 | 0.578108 | [
"MIT"
] | rtigithub/HalconExamples | HalconTemplateDemo/HalconTemplateDemo/Models/ICameraCalibrationProcessor.cs | 7,467 | C# |
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
using UnityEngine;
using UnityEditor;
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Component Mask", "Vector Operators", "Mask certain channels from vectors/color components" )]
public sealed class ComponentMaskNode : ParentNode
{
private const string OutputLocalVarName = "componentMask";
[SerializeField]
private bool[] m_selection = { true, true, true, true };
[SerializeField]
private int m_outputPortCount = 4;
[SerializeField]
private string[] m_labels;
private int m_cachedOrderId = -1;
private int m_cachedSingularId = -1;
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
AddInputPort( WirePortDataType.FLOAT4, false, Constants.EmptyPortValue );
AddOutputPort( WirePortDataType.FLOAT4, Constants.EmptyPortValue );
m_useInternalPortData = true;
m_autoWrapProperties = true;
m_selectedLocation = PreviewLocation.TopCenter;
m_labels = new string[] { "X", "Y", "Z", "W" };
m_previewShaderGUID = "b78e2b295c265cd439c80d218fb3e88e";
SetAdditonalTitleText( "Value( XYZW )" );
}
public override void SetPreviewInputs()
{
base.SetPreviewInputs();
Vector4 order = new Vector4(-1,-1,-1,-1);
int lastIndex = 0;
int singularId = -1;
if ( m_selection[ 0 ] )
{
order.Set( lastIndex, order.y , order.z , order.w );
lastIndex++;
singularId = 0;
}
if ( m_selection[ 1 ] )
{
order.Set( order.x, lastIndex, order.z, order.w );
lastIndex++;
singularId = 1;
}
if ( m_selection[ 2 ] )
{
order.Set( order.x, order.y, lastIndex, order.w );
lastIndex++;
singularId = 2;
}
if ( m_selection[ 3 ] )
{
order.Set( order.x, order.y, order.z, lastIndex );
lastIndex++;
singularId = 3;
}
if ( lastIndex != 1 )
singularId = -1;
if ( m_cachedOrderId == -1 )
m_cachedOrderId = Shader.PropertyToID( "_Order" );
if ( m_cachedSingularId == -1 )
m_cachedSingularId = Shader.PropertyToID( "_Singular" );
PreviewMaterial.SetVector( m_cachedOrderId, order );
PreviewMaterial.SetFloat( m_cachedSingularId, singularId );
}
public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true )
{
base.OnInputPortConnected( portId, otherNodeId, otherPortId, activateNode );
UpdatePorts();
UpdateTitle();
}
public override void OnConnectedOutputNodeChanges( int outputPortId, int otherNodeId, int otherPortId, string name, WirePortDataType type )
{
base.OnConnectedOutputNodeChanges( outputPortId, otherNodeId, otherPortId, name, type );
UpdatePorts();
UpdateTitle();
}
public override void OnInputPortDisconnected( int portId )
{
base.OnInputPortDisconnected( portId );
UpdateTitle();
}
void UpdatePorts()
{
m_inputPorts[ 0 ].MatchPortToConnection();
int count = 0;
switch ( m_inputPorts[ 0 ].DataType )
{
case WirePortDataType.FLOAT4:
case WirePortDataType.OBJECT:
case WirePortDataType.COLOR:
{
count = 4;
}
break;
case WirePortDataType.FLOAT3:
{
count = 3;
}
break;
case WirePortDataType.FLOAT2:
{
count = 2;
}
break;
case WirePortDataType.FLOAT:
case WirePortDataType.INT:
case WirePortDataType.FLOAT3x3:
case WirePortDataType.FLOAT4x4:
{ }
break;
}
int activeCount = 0;
if ( count > 0 )
{
for ( int i = 0; i < count; i++ )
{
if ( m_selection[ i ] )
activeCount += 1;
}
}
m_outputPortCount = activeCount;
switch ( activeCount )
{
case 0: ChangeOutputType( m_inputPorts[ 0 ].DataType, false ); break;
case 1: ChangeOutputType( WirePortDataType.FLOAT, false ); break;
case 2: ChangeOutputType( WirePortDataType.FLOAT2, false ); break;
case 3: ChangeOutputType( WirePortDataType.FLOAT3, false ); break;
case 4: ChangeOutputType( m_inputPorts[ 0 ].DataType, false ); break;
}
}
private void UpdateTitle()
{
int count = 0;
string additionalText = string.Empty;
switch ( m_inputPorts[ 0 ].DataType )
{
case WirePortDataType.FLOAT4:
case WirePortDataType.OBJECT:
case WirePortDataType.COLOR:
{
count = 4;
}
break;
case WirePortDataType.FLOAT3:
{
count = 3;
}
break;
case WirePortDataType.FLOAT2:
{
count = 2;
}
break;
case WirePortDataType.FLOAT:
case WirePortDataType.INT:
{
count = 0;
}
break;
case WirePortDataType.FLOAT3x3:
case WirePortDataType.FLOAT4x4:
{ }
break;
}
if ( count > 0 )
{
for ( int i = 0; i < count; i++ )
{
if ( m_selection[ i ] )
{
additionalText += UIUtils.GetComponentForPosition( i, m_inputPorts[ 0 ].DataType ).ToUpper();
}
}
}
if ( additionalText.Length > 0 )
SetAdditonalTitleText( "Value( " + additionalText + " )" );
else
SetAdditonalTitleText( string.Empty );
}
public override void DrawProperties()
{
base.DrawProperties();
EditorGUILayout.BeginVertical();
int count = 0;
switch ( m_inputPorts[ 0 ].DataType )
{
case WirePortDataType.FLOAT4:
case WirePortDataType.OBJECT:
case WirePortDataType.COLOR:
{
count = 4;
}
break;
case WirePortDataType.FLOAT3:
{
count = 3;
}
break;
case WirePortDataType.FLOAT2:
{
count = 2;
}
break;
case WirePortDataType.FLOAT:
case WirePortDataType.INT:
case WirePortDataType.FLOAT3x3:
case WirePortDataType.FLOAT4x4:
{ }
break;
}
int activeCount = 0;
if ( count > 0 )
{
for ( int i = 0; i < count; i++ )
{
m_selection[ i ] = EditorGUILayoutToggleLeft( m_labels[i], m_selection[ i ] );
m_labels[ i ] = UIUtils.GetComponentForPosition( i, m_inputPorts[ 0 ].DataType ).ToUpper();
if ( m_selection[ i ] )
{
activeCount += 1;
}
}
}
if ( activeCount != m_outputPortCount )
{
m_outputPortCount = activeCount;
switch ( activeCount )
{
case 0: ChangeOutputType( m_inputPorts[ 0 ].DataType, false ); break;
case 1: ChangeOutputType( WirePortDataType.FLOAT, false ); break;
case 2: ChangeOutputType( WirePortDataType.FLOAT2, false ); break;
case 3: ChangeOutputType( WirePortDataType.FLOAT3, false ); break;
case 4: ChangeOutputType( m_inputPorts[ 0 ].DataType, false ); break;
}
UpdateTitle();
SetSaveIsDirty();
}
EditorGUILayout.EndVertical();
}
public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalVar )
{
if( m_outputPorts[ 0 ].IsLocalValue )
return m_outputPorts[ 0 ].LocalValue;
string value = m_inputPorts[ 0 ].GenerateShaderForOutput( ref dataCollector, m_inputPorts[ 0 ].DataType, ignoreLocalVar );
int count = 0;
switch ( m_inputPorts[ 0 ].DataType )
{
case WirePortDataType.FLOAT4:
case WirePortDataType.OBJECT:
case WirePortDataType.COLOR:
{
count = 4;
}
break;
case WirePortDataType.FLOAT3:
{
count = 3;
}
break;
case WirePortDataType.FLOAT2:
{
count = 2;
}
break;
case WirePortDataType.FLOAT:
case WirePortDataType.INT:
{
count = 0;
}
break;
case WirePortDataType.FLOAT3x3:
case WirePortDataType.FLOAT4x4:
{ }
break;
}
if ( count > 0 )
{
value = string.Format("({0}).",value);
for ( int i = 0; i < count; i++ )
{
if ( m_selection[ i ] )
{
value += UIUtils.GetComponentForPosition( i, m_inputPorts[ 0 ].DataType );
}
}
}
return CreateOutputLocalVariable( 0, value, ref dataCollector );
}
public string GetComponentForPosition( int i )
{
switch ( i )
{
case 0:
{
return ( ( m_outputPorts[ 0 ].DataType == WirePortDataType.COLOR ) ? "r" : "x" );
}
case 1:
{
return ( ( m_outputPorts[ 0 ].DataType == WirePortDataType.COLOR ) ? "g" : "y" );
}
case 2:
{
return ( ( m_outputPorts[ 0 ].DataType == WirePortDataType.COLOR ) ? "b" : "z" );
}
case 3:
{
return ( ( m_outputPorts[ 0 ].DataType == WirePortDataType.COLOR ) ? "a" : "w" );
}
}
return string.Empty;
}
public override void ReadFromString( ref string[] nodeParams )
{
base.ReadFromString( ref nodeParams );
for ( int i = 0; i < 4; i++ )
{
m_selection[ i ] = Convert.ToBoolean( GetCurrentParam( ref nodeParams ) );
}
UpdateTitle();
}
public override void WriteToString( ref string nodeInfo, ref string connectionsInfo )
{
base.WriteToString( ref nodeInfo, ref connectionsInfo );
for ( int i = 0; i < 4; i++ )
{
IOUtils.AddFieldValueToString( ref nodeInfo, m_selection[ i ] );
}
}
}
}
| 23.858667 | 141 | 0.634179 | [
"Apache-2.0"
] | Eresia/Harpooneers | Assets/Plugins/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/ComponentMaskNode.cs | 8,947 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text.RegularExpressions;
using Charlotte.Commons;
using Charlotte.Tests;
namespace Charlotte
{
class Program
{
static void Main(string[] args)
{
ProcMain.CUIMain(new Program().Main2);
}
private void Main2(ArgsReader ar)
{
SCommon.DeletePath(Consts.OUTPUT_DIR);
SCommon.CreateDir(Consts.OUTPUT_DIR);
// -- choose one --
Main3();
//new Test0001().Test01();
//new Test0001().Test02();
//new Test0001().Test03();
// --
Console.WriteLine("Press ENTER key.");
Console.ReadLine();
}
private void Main3()
{
new MakePicture().Make01();
}
}
}
| 17.26087 | 41 | 0.685139 | [
"MIT"
] | soleil-taruto/wb | t20210203_MakePicture/Claes20200001/Claes20200001/Program.cs | 796 | C# |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using NUnit.Framework;
using ProtoBuf.Meta;
namespace AgGateway.ADAPT.TestUtilities.ProtobufContract
{
[TestFixture]
public class ProtobufContractGeneratorTest
{
private string _tempXmlFileCorrect;
private string _tempXmlFileIncorrect;
private string _tempProtoFile;
private string _tempDirectory;
private readonly TestClassA _testClassA = new TestClassA { AString1 = "ABC", AString2 = "XYZ" };
[SetUp]
public void Setup()
{
var resourceDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ProtobufTestFiles");
var tempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(tempDirectory);
_tempDirectory = tempDirectory;
_tempXmlFileCorrect = Path.Combine(tempDirectory, "text2.xml");
File.WriteAllText(_tempXmlFileCorrect, File.ReadAllText(Path.Combine(resourceDirectory, "ProtobufMappingTest2.xml")));
_tempXmlFileIncorrect = Path.Combine(tempDirectory, "text3.xml");
File.WriteAllText(_tempXmlFileIncorrect, File.ReadAllText(Path.Combine(resourceDirectory, "ProtobufMappingTest3.xml")));
_tempProtoFile = Path.Combine(tempDirectory, "test.proto");
File.WriteAllBytes(_tempProtoFile, File.ReadAllBytes(Path.Combine(resourceDirectory, "test.proto")));
}
[Test]
[Ignore("Run this test to generate the protobuf model code")]
public void GenerateCodeThatCreateProtobufModel()
{
var generator = new ProtobufContractGenerator(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "ProtobufMapping.xml"));
// BEGINNING OF GENERATED CODE:
// This code is generated by running the GenerateCodeThatCreateProtobufModel() method in ProtobufContractGeneratorTest
// (but you have to manually copy it)
Debug.WriteLine(@"// BEGINNING OF GENERATED CODE");
Debug.WriteLine(@"// This code is generated by running the GenerateCodeThatCreateProtobufModel() method in ProtobufContractGeneratorTest");
Debug.WriteLine(@"// (but you have to manually copy it here)");
generator.GenerateContractCode("AgGateway.ADAPT.ApplicationDataModel.dll");
// These are manually added. They are used for reference layer protobuf
Debug.WriteLine(@"model[typeof(RasterData<EnumeratedRepresentation, EnumerationMember>)].Add(463, ""Representation"");");
Debug.WriteLine(@"model[typeof(RasterData<StringRepresentation, string>)].Add(464, ""Representation"");");
Debug.WriteLine(@"model[typeof(RasterData<NumericRepresentation, NumericValue>)].Add(465, ""Representation"");");
Debug.WriteLine(@"model[typeof(SerializableRasterData<string>)].Add(466, ""values"");");
Debug.WriteLine(@"model[typeof(SerializableRasterData<EnumerationMember>)].Add(467, ""values"");");
Debug.WriteLine(@"model[typeof(SerializableRasterData<NumericValue>)].Add(468, ""values"");");
Debug.WriteLine(@"model[typeof(SerializableRasterData<string>)].Add(469, ""Representation"");");
Debug.WriteLine(@"model[typeof(SerializableRasterData<EnumerationMember>)].Add(470, ""Representation"");");
Debug.WriteLine(@"model[typeof(SerializableRasterData<NumericValue>)].Add(471, ""Representation"");");
Debug.WriteLine(@"model[typeof(SerializableReferenceLayer)].Add(472, ""ReferenceLayer"");");
Debug.WriteLine(@"model[typeof(SerializableReferenceLayer)].Add(473, ""StringValues"");");
Debug.WriteLine(@"model[typeof(SerializableReferenceLayer)].Add(474, ""EnumerationMemberValues"");");
Debug.WriteLine(@"model[typeof(SerializableReferenceLayer)].Add(475, ""NumericValueValues"");");
Debug.WriteLine(@"// END OF GENERATED CODE:");
Debug.WriteLine(@"//");
Debug.WriteLine(@"//");
}
[Test]
public void WhenExportThenFileIsWritten()
{
var generator = new ProtobufContractGenerator(_tempXmlFileCorrect);
var model = generator.GenerateContractCode("AgGateway.ADAPT.TestUtilities.dll");
var filename = Path.Combine(_tempDirectory, "test.proto");
var testClassA = new TestClassA { AString1 = "ABC", AString2 = "XYZ" };
Write(filename, testClassA, model);
File.Exists(filename);
}
[Test]
public void WhenExportAndImportTestClassesThenWorks()
{
var generator = new ProtobufContractGenerator(_tempXmlFileCorrect);
var model = generator.GenerateContractCode("AgGateway.ADAPT.TestUtilities.dll");
var filename = Path.Combine(_tempDirectory, "test.proto");
var testClassA = new TestClassA { AString1 = "ABC", AString2 = "XYZ"};
Write(filename, testClassA, model);
var readTestClassA = Read<TestClassA>(filename, model);
Assert.AreEqual(testClassA.AString1, readTestClassA.AString1);
Assert.AreEqual(testClassA.AString2, readTestClassA.AString2);
}
[Test]
public void WhenImportWithWrongContractThenDoesNotWork()
{
var generator = new ProtobufContractGenerator(_tempXmlFileIncorrect);
var model = generator.GenerateContractCode("AgGateway.ADAPT.TestUtilities.dll");
var readTestClassA = Read<TestClassA>(_tempProtoFile, model);
Assert.AreNotEqual(_testClassA.AString1, readTestClassA.AString1);
Assert.AreNotEqual(_testClassA.AString2, readTestClassA.AString2);
}
[Test]
public void WhenImportWithCorrectContractThenWorks()
{
var generator = new ProtobufContractGenerator(_tempXmlFileCorrect);
var model = generator.GenerateContractCode("AgGateway.ADAPT.TestUtilities.dll");
var readTestClassA = Read<TestClassA>(_tempProtoFile, model);
Assert.AreEqual(_testClassA.AString1, readTestClassA.AString1);
Assert.AreEqual(_testClassA.AString2, readTestClassA.AString2);
}
[Test]
public void GivenBadAssemblyWhenGenerateThenModelIsNull()
{
var generator = new ProtobufContractGenerator(_tempXmlFileCorrect);
var model = generator.GenerateContractCode("ThisDoesntExist.dll");
Assert.IsNull(model);
}
[Test]
public void GivenBadXmlFileWhenGenerateThenModelIsNull()
{
var generator = new ProtobufContractGenerator(@"..\..\ProtobufTestFiles\HelloThere.xml");
var model = generator.GenerateContractCode("TestUtilities.dll");
Assert.IsNull(model);
}
[TearDown]
public void TearDown()
{
Directory.Delete(_tempDirectory, true);
}
private void Write<T>(string path, T content, RuntimeTypeModel model)
{
using (var fileStream = File.Open(path, FileMode.Create))
{
model.Serialize(fileStream, content);
}
}
private T Read<T>(string path, RuntimeTypeModel model)
{
using (var fileStream = File.OpenRead(path))
{
return (T)model.Deserialize(fileStream, null, typeof(T));
}
}
}
}
| 43.305085 | 151 | 0.653359 | [
"EPL-1.0"
] | tarakreddy/ADMPlugin | TestUtilities/ProtobufContract/ProtobufContractGeneratorTest.cs | 7,665 | C# |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.Language.StandardClassification;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using Roslyn.Utilities;
namespace Microsoft.VisualStudio.InteractiveWindow.Commands
{
/// <summary>
/// Represents a command which can be run from a REPL window.
///
/// This interface is a MEF contract and can be implemented and exported to add commands to the REPL window.
/// </summary>
internal abstract class InteractiveWindowCommand : IInteractiveWindowCommand
{
public virtual IEnumerable<ClassificationSpan> ClassifyArguments(ITextSnapshot snapshot, Span argumentsSpan, Span spanToClassify)
{
return SpecializedCollections.EmptyEnumerable<ClassificationSpan>();
}
public abstract Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments);
public abstract string Description { get; }
public virtual IEnumerable<KeyValuePair<string, string>> ParametersDescription
{
get { return null; }
}
public virtual IEnumerable<string> DetailedDescription
{
get { return null; }
}
public virtual string CommandLine
{
get { return null; }
}
public virtual IEnumerable<string> Names
{
get { return null; }
}
protected void ReportInvalidArguments(IInteractiveWindow window)
{
var commands = (IInteractiveWindowCommands)window.Properties[typeof(IInteractiveWindowCommands)];
commands.DisplayCommandUsage(this, window.ErrorOutputWriter, displayDetails: false);
}
}
}
| 35.454545 | 161 | 0.694359 | [
"Apache-2.0"
] | akoeplinger/roslyn | src/InteractiveWindow/Editor/Commands/InteractiveWindowCommand.cs | 1,952 | C# |
using System;
using System.Linq;
using System.Web.Http;
using System.Web.Mvc;
using SharpDevelopWebApi.Models;
namespace SharpDevelopWebApi.Controllers
{
/// <summary>
/// Description of MovieController.
/// </summary>
public class MovieController : ApiController
{
readonly SDWebApiDbContext _db = new SDWebApiDbContext();
[HttpPost]
[Route("api/movie")]
public IHttpActionResult Create(Movie movie)
{
_db.Movies.Add(movie);
_db.SaveChanges();
return Ok(movie);
}
[HttpGet]
[Route("api/movie")]
public IHttpActionResult GetAll(string keyword = "")
{
keyword = keyword.Trim();
var movies = _db.Movies
.Where(x =>
x.Actor.ToLower().Contains(keyword) ||
x.Title.ToLower() .Contains(keyword) ||
x.Writer.ToLower() .Contains(keyword))
.ToList();
return Ok(movies);
}
[HttpGet]
[Route("api/movie/{Id}")]
public IHttpActionResult Get(int Id)
{
var movie = _db.Movies.Find(Id);
if (movie != null)
return Ok(movie);
else
return BadRequest("movie Id is invalid or not found");
}
[HttpDelete]
[Route("api/movie/{Id}")]
public IHttpActionResult Delete(int Id)
{
var movie = _db.Movies.Find(Id);
if (movie != null)
{
_db.Movies.Remove(movie);
_db.SaveChanges();
return Ok("Movie removed successfully!");
}
else
return BadRequest("Movie Id does not exist");
}
[HttpPut]
[Route("api/movie")]
public IHttpActionResult Update(Movie updateMovie)
{
var movie = _db.Movies.Find(updateMovie.Id);
if (movie != null)
{
movie.Title = updateMovie.Title;
movie.Actor = updateMovie.Actor;
movie.Director = updateMovie.Director;
movie.Poster = updateMovie.Poster;
movie.Genre = updateMovie.Genre;
movie.Language = updateMovie.Language;
movie.Summary = updateMovie.Summary;
movie.Release = updateMovie.Release;
movie.Runtime = updateMovie.Runtime;
movie.Writer = updateMovie.Writer;
movie.Type = updateMovie.Type;
movie.Ratings = updateMovie.Ratings;
movie.Release = updateMovie.Release;
_db.Entry(movie).State = System.Data.Entity.EntityState.Modified;
_db.SaveChanges();
return Ok(movie);
}
else
return BadRequest("Diary id is invalid or not found");
}
}
} | 29.282828 | 81 | 0.525009 | [
"MIT"
] | koolamadridano/webapi-tflix-app | Controllers/MovieController.cs | 2,901 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the comprehendmedical-2018-10-30.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.ComprehendMedical.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ComprehendMedical.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RxNormAttribute Object
/// </summary>
public class RxNormAttributeUnmarshaller : IUnmarshaller<RxNormAttribute, XmlUnmarshallerContext>, IUnmarshaller<RxNormAttribute, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
RxNormAttribute IUnmarshaller<RxNormAttribute, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public RxNormAttribute Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
RxNormAttribute unmarshalledObject = new RxNormAttribute();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("BeginOffset", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.BeginOffset = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EndOffset", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.EndOffset = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Id", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RelationshipScore", targetDepth))
{
var unmarshaller = FloatUnmarshaller.Instance;
unmarshalledObject.RelationshipScore = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Score", targetDepth))
{
var unmarshaller = FloatUnmarshaller.Instance;
unmarshalledObject.Score = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Text", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Text = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Traits", targetDepth))
{
var unmarshaller = new ListUnmarshaller<RxNormTrait, RxNormTraitUnmarshaller>(RxNormTraitUnmarshaller.Instance);
unmarshalledObject.Traits = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static RxNormAttributeUnmarshaller _instance = new RxNormAttributeUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static RxNormAttributeUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 38.597015 | 158 | 0.593387 | [
"Apache-2.0"
] | DetlefGolze/aws-sdk-net | sdk/src/Services/ComprehendMedical/Generated/Model/Internal/MarshallTransformations/RxNormAttributeUnmarshaller.cs | 5,172 | C# |
//Copyright 2017 Open Science, Engineering, Research and Development Information Systems Open, LLC. (OSRS Open)
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using Osrs.Data;
using System.Collections.Generic;
namespace Osrs.Oncor.WellKnown.Fish
{
//NOTE: due to DET model, there is no need for "update" just delete/create - although the data types support mutation
//Provides IO for: CatchMetric, NetHaulEvent, FishCount
public interface ICatchHaulProvider
{
bool CanGet();
bool CanDelete();
bool CanDelete(CatchMetric item);
bool CanDelete(NetHaulEvent item);
bool CanDelete(FishCount item);
bool CanCreate();
IEnumerable<CatchMetric> GetMetrics();
IEnumerable<NetHaulEvent> GetHauls();
IEnumerable<FishCount> GetFishCounts();
IEnumerable<CatchMetric> GetMetrics(CompoundIdentity catchEffortId);
IEnumerable<CatchMetric> GetMetrics(string metricType);
IEnumerable<CatchMetric> GetMetrics(CompoundIdentity catchEffortId, string metricType);
IEnumerable<NetHaulEvent> GetHauls(CompoundIdentity catchEffortId);
IEnumerable<FishCount> GetFishCounts(CompoundIdentity catchEffortId);
IEnumerable<FishCount> GetFishCountsByTaxa(CompoundIdentity taxaId);
IEnumerable<FishCount> GetFishCounts(CompoundIdentity catchEffortId, CompoundIdentity taxaId);
IEnumerable<FishCount> GetFishCounts(CompoundIdentity catchEffortId, IEnumerable<CompoundIdentity> taxaId);
bool Delete(CatchMetric item);
bool Delete(NetHaulEvent item);
bool Delete(FishCount item);
CatchMetric CreateMetric(CompoundIdentity catchEffortId, float value, string metricType);
CatchMetric CreateMetric(CompoundIdentity catchEffortId, float value, string metricType, string description);
NetHaulEvent CreateHaul(CompoundIdentity catchEffortId, CompoundIdentity netId, float areaSampled, float volumeSampled);
NetHaulEvent CreateHaul(CompoundIdentity catchEffortId, CompoundIdentity netId, float areaSampled, float volumeSampled, string description);
FishCount CreateFishCount(CompoundIdentity catchEffortId, CompoundIdentity taxaId, uint count);
FishCount CreateFishCount(CompoundIdentity catchEffortId, CompoundIdentity taxaId, uint count, string description);
}
}
| 48.083333 | 148 | 0.752513 | [
"Apache-2.0"
] | OSRS/Oncor_Base | Osrs.Oncor.WellKnown.Fish/Osrs.Oncor.WellKnown.Fish/ICatchHaulProvider.cs | 2,887 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the frauddetector-2019-11-15.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.FraudDetector.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.FraudDetector.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateVariable Request Marshaller
/// </summary>
public class UpdateVariableRequestMarshaller : IMarshaller<IRequest, UpdateVariableRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((UpdateVariableRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateVariableRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.FraudDetector");
string target = "AWSHawksNestServiceFacade.UpdateVariable";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-15";
request.HttpMethod = "POST";
request.ResourcePath = "/";
request.MarshallerVersion = 2;
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetDefaultValue())
{
context.Writer.WritePropertyName("defaultValue");
context.Writer.Write(publicRequest.DefaultValue);
}
if(publicRequest.IsSetDescription())
{
context.Writer.WritePropertyName("description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetVariableType())
{
context.Writer.WritePropertyName("variableType");
context.Writer.Write(publicRequest.VariableType);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateVariableRequestMarshaller _instance = new UpdateVariableRequestMarshaller();
internal static UpdateVariableRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVariableRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 36.569106 | 144 | 0.593375 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/FraudDetector/Generated/Model/Internal/MarshallTransformations/UpdateVariableRequestMarshaller.cs | 4,498 | C# |
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Abp.Modules;
using Abp.Reflection.Extensions;
using ProyectoBase.Configuration;
namespace ProyectoBase.Web.Host.Startup
{
[DependsOn(
typeof(ProyectoBaseWebCoreModule))]
public class ProyectoBaseWebHostModule: AbpModule
{
private readonly IWebHostEnvironment _env;
private readonly IConfigurationRoot _appConfiguration;
public ProyectoBaseWebHostModule(IWebHostEnvironment env)
{
_env = env;
_appConfiguration = env.GetAppConfiguration();
}
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(typeof(ProyectoBaseWebHostModule).GetAssembly());
}
}
}
| 28 | 101 | 0.709184 | [
"MIT"
] | ambiente-de-pruebas/Boilerplate | aspnet-core/src/ProyectoBase.Web.Host/Startup/ProyectoBaseWebHostModule.cs | 786 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using BDFramework.ResourceMgr.V2;
using UnityEngine;
using Object = UnityEngine.Object;
namespace BDFramework.ResourceMgr
{
/// <summary>
/// load path传参类型
/// </summary>
public enum LoadPathType
{
RuntimePath,
GUID
}
public interface IResMgr
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="rootPath"></param>
void Init(string rootPath ,RuntimePlatform platform);
/// <summary>
/// 加载资源
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="assetLoadPath"></param>
/// <param name="pathType"></param>
/// <param name="abName"></param>
/// <returns></returns>
T Load<T>(string assetLoadPath, LoadPathType pathType = LoadPathType.RuntimePath) where T : UnityEngine.Object;
/// <summary>
/// 加载资源
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="abName"></param>
/// <param name="assetPatharam>
/// <returns></returns>
UnityEngine.Object Load(Type type, string assetLoadPath);
/// <summary>
/// 加载所有资源
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="path"></param>
/// <param name="abName"></param>
/// <returns></returns>
T[] LoadAll<T>(string path) where T : UnityEngine.Object;
// <summary>
/// 异步加载接口
/// 未加载则返回LoadTask自行驱动,否则返回已加载的内容
/// 一般作为Editor验证使用,不作为Runtime正式API
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="assetLoadPath">api传入的加载路径,Runtime下的相对路径</param>
/// <returns>返回Task</returns>
LoadTaskGroup AsyncLoad<T>(string assetLoadPath) where T : UnityEngine.Object;
/// <summary>
/// 异步加载资源
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="assetLoadPath"></param>
/// <param name="callback"></param>
/// <returns></returns>
int AsyncLoad<T>(string assetLoadPath, Action<T> callback) where T : UnityEngine.Object;
/// <summary>
/// 异步加载资源表
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="assetLoadPathList"></param>
/// <param name="onLoadProcess"></param>
/// <param name="onLoadEnd"></param>
/// <param name="sources"></param>
/// <returns></returns>
List<int> AsyncLoad(List<string> assetLoadPathList,
Action<int, int> onLoadProcess,
Action<IDictionary<string, Object>> onLoadEnd);
/// <summary>
/// 取消一个加载任务
/// </summary>
/// <param name="taskid"></param>
bool LoadCancel(int taskid);
/// <summary>
/// 取消所有加载任务
/// </summary>
void LoadAllCancel();
/// <summary>
/// 获取某个目录下文件
/// 以runtime为根目录
/// </summary>
string[] GetAssets(string floder, string searchPattern = null);
/// <summary>
/// 预热sharder
/// </summary>
void WarmUpShaders();
/// <summary>
/// 卸载指定ab
/// </summary>
/// <param name="assetLoadPath"></param>
/// <param name="isForceUnload"></param>
/// <param name="type"></param>
void UnloadAsset(string assetLoadPath, bool isForceUnload = false, Type type = null);
/// <summary>
/// 卸载所有ab
/// </summary>
void UnloadAllAsset();
/// <summary>
/// 设置加载配置
/// </summary>
/// <param name="maxLoadTaskNum"></param>
/// <param name="maxUnloadTaskNum"></param>
void SetLoadConfig(int maxLoadTaskNum = -1, int maxUnloadTaskNum = -1);
}
}
| 31.207692 | 120 | 0.515159 | [
"Apache-2.0"
] | yimengfan/BDFramework | Packages/com.popo.bdframework/Runtime/AssetsManager/ArtAsset/IResMgr.cs | 4,202 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNative.Network.V20170601.Outputs
{
[OutputType]
public sealed class VirtualNetworkGatewayIPConfigurationResponse
{
/// <summary>
/// A unique read-only string that changes whenever the resource is updated.
/// </summary>
public readonly string? Etag;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string? Id;
/// <summary>
/// The name of the resource that is unique within a resource group. This name can be used to access the resource.
/// </summary>
public readonly string? Name;
/// <summary>
/// The private IP allocation method. Possible values are: 'Static' and 'Dynamic'.
/// </summary>
public readonly string? PrivateIPAllocationMethod;
/// <summary>
/// The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
/// </summary>
public readonly string ProvisioningState;
/// <summary>
/// The reference of the public IP resource.
/// </summary>
public readonly Outputs.SubResourceResponse? PublicIPAddress;
/// <summary>
/// The reference of the subnet resource.
/// </summary>
public readonly Outputs.SubResourceResponse? Subnet;
[OutputConstructor]
private VirtualNetworkGatewayIPConfigurationResponse(
string? etag,
string? id,
string? name,
string? privateIPAllocationMethod,
string provisioningState,
Outputs.SubResourceResponse? publicIPAddress,
Outputs.SubResourceResponse? subnet)
{
Etag = etag;
Id = id;
Name = name;
PrivateIPAllocationMethod = privateIPAllocationMethod;
ProvisioningState = provisioningState;
PublicIPAddress = publicIPAddress;
Subnet = subnet;
}
}
}
| 32.704225 | 122 | 0.616279 | [
"Apache-2.0"
] | pulumi-bot/pulumi-azure-native | sdk/dotnet/Network/V20170601/Outputs/VirtualNetworkGatewayIPConfigurationResponse.cs | 2,322 | C# |
namespace Mindream.Components
{
/// <summary>
/// This component can be used for special case like Singleton (need Instance property in static).
/// </summary>
/// <seealso cref="Mindream.Components.AComponent" />
public abstract class ASingletonFunctionComponent : AComponent
{
}
} | 31.5 | 106 | 0.67619 | [
"MIT"
] | mastertnt/Mindream | Mindream/Components/ASingletonFunctionComponent.cs | 317 | C# |
// <copyright file="DefaultMapRepository.cs" company="Jochen Linnemann - IT-Service">
// Copyright (c) 2017-2021 Jochen Linnemann, Cory Gill.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Claims;
using System.Threading.Tasks;
using CampaignKit.WorldMap.Core.Entities;
using CampaignKit.WorldMap.Core.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.Processing;
namespace CampaignKit.WorldMap.Core.Data
{
/// <summary>
/// Default implementation of the EntityFramework repository for Map data elements.
/// </summary>
/// <seealso cref="IMapRepository" />
public class DefaultMapRepository : IMapRepository
{
private const int TilePixelSize = 250;
/// <summary>
/// The application configuration.
/// </summary>
private readonly IConfiguration _configuration;
/// <summary>
/// The application logging service.
/// </summary>
private readonly ILogger _loggerService;
/// <summary>
/// The user manager service.
/// </summary>
private readonly IUserManagerService _userManagerService;
/// <summary>
/// The BLOB storage service.
/// </summary>
private readonly IBlobStorageService _blobStorageService;
/// <summary>
/// The table storage service.
/// </summary>
private readonly ITableStorageService _tableStorageService;
/// <summary>
/// The queue storage service
/// </summary>
private readonly IQueueStorageService _queueStorageService;
/// <summary>
/// Initializes a new instance of the <see cref="DefaultMapRepository" /> class.
/// </summary>
/// <param name="configuration">The application configuration.</param>
/// <param name="loggerService">The logger service.</param>
/// <param name="tableStorageService">The table storage service.</param>
/// <param name="userManagerService">The user manager service.</param>
/// <param name="blobStorageService">The blob storage service.</param>
/// <param name="queueStorageService">The queue storage service.</param>
public DefaultMapRepository(
IConfiguration configuration,
ILogger<DefaultMapRepository> loggerService,
ITableStorageService tableStorageService,
IUserManagerService userManagerService,
IBlobStorageService blobStorageService,
IQueueStorageService queueStorageService)
{
_configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
_loggerService = loggerService ?? throw new ArgumentNullException(nameof(loggerService));
_tableStorageService = tableStorageService ?? throw new ArgumentNullException(nameof(tableStorageService));
_userManagerService = userManagerService ?? throw new ArgumentNullException(nameof(userManagerService));
_blobStorageService = blobStorageService ?? throw new ArgumentNullException(nameof(blobStorageService));
_queueStorageService = queueStorageService ?? throw new ArgumentNullException(nameof(queueStorageService));
}
/// <summary>
/// Deletes the specified map and all child entities.
/// Ensures that the authenticated user is owner of the map
/// before any database operation is performed.
/// </summary>
/// <param name="mapId">The map identifier.</param>
/// <param name="user">The authenticated user.</param>
/// <returns>
/// <c>true</c> if successful, <c>false</c> otherwise.
/// </returns>
public async Task<bool> Delete(string mapId, ClaimsPrincipal user)
{
// Ensure user is authenticated
var userId = _userManagerService.GetUserId(user);
if (userId == null)
{
_loggerService.LogError("Database operation prohibited for non-authenticated user");
return false;
}
// Determine if this map exists
var map = await _tableStorageService.GetMapRecordAsync(mapId);
if (map == null)
{
_loggerService.LogError($"Map with id:{mapId} not found");
return false;
}
// Remove the map from the context.
await _tableStorageService.DeleteMapRecordAsync(map);
// Delete map directory and files
await _blobStorageService.DeleteFolderAsync($"map{map.MapId}");
// Return result
return true;
}
/// <summary>
/// Find a map based on its identifier.
/// If the map is private then the user must be owner of map or the
/// correct secret must be provided.
/// </summary>
/// <param name="mapId">The map identifier.</param>
/// <param name="user">The authenticated user.</param>
/// <param name="shareKey">Map secret to be used by friends of map author.</param>
/// <returns>
/// <c>Map</c> if successful, <c>null</c> otherwise.
/// </returns>
public async Task<Map> Find(string mapId, ClaimsPrincipal user, string shareKey)
{
// Retrieve the map entry and any associated markers.
var map = await _tableStorageService.GetMapRecordAsync(mapId);
// Ensure map has been found
if (map == null)
{
_loggerService.LogError($"Map with id:{mapId} not found");
return null;
}
// If the map is not public ensure user has rights to it
if (!map.IsPublic)
{
var userid = _userManagerService.GetUserId(user);
if (!map.UserId.Equals(userid) && !map.ShareKey.Equals(shareKey))
{
_loggerService.LogError($"User not authorized to access map with id:{mapId}.");
return null;
}
}
return map;
}
/// <summary>
/// Finds all maps that the user is authorized to see.
/// Unauthenticated users will have access only to public maps.
/// Authenticated users will see their maps and, optionally, public maps.
/// </summary>
/// <param name="user">The authenticated user.</param>
/// <param name="includePublic">Specify whether public maps should also be returned.</param>
/// <returns>IEnumerable<Map>.</returns>
public async Task<IEnumerable<Map>> FindAll(ClaimsPrincipal user, bool includePublic)
{
var userId = _userManagerService.GetUserId(user);
return await _tableStorageService.GetMapRecordsForUserAsync(userId, includePublic);
}
/// <summary>
/// Creates the specified map. Requires an authenticated user.
/// </summary>
/// <param name="map">The map entity to create.</param>
/// <param name="stream">Map image data stream.</param>
/// <param name="user">The authenticated user.</param>
/// <returns>
/// <c>id</c> if successful, <c>0</c> otherwise.
/// </returns>
public async Task<string> Create(Map map, Stream stream, ClaimsPrincipal user)
{
// **********************
// Precondition Tests
// **********************
// Image data not provided?
if (stream == null)
{
return null;
}
// User must be authenticated
var userid = _userManagerService.GetUserId(user);
if (userid == null)
{
_loggerService.LogError("Database operation prohibited for non-authenticated user");
return null;
}
// ************************************
// Create DB entity (Generate Map ID)
// ************************************
map.UserId = userid;
await _tableStorageService.CreateMapRecordAsync(map);
// **********************
// Create Map Folder
// **********************
var folderName = $"map{map.MapId}";
// ****************************
// Save Original Image File
// ****************************
byte[] originalImageBlob, masterImageBlob;
using (var ms = new MemoryStream())
{
// Save original file.
stream.CopyTo(ms);
originalImageBlob = ms.ToArray();
await _blobStorageService.CreateBlobAsync(folderName, $"original-file{map.FileExtension}", originalImageBlob);
}
// ****************************
// Save PNG Master Image File
// ****************************
var masterImage = Image.Load(originalImageBlob);
var width = masterImage.Width;
var height = masterImage.Height;
var largestSize = Math.Max(width, height);
var maxZoomLevel = Math.Log((double)largestSize / TilePixelSize, 2);
var adjustedMaxZoomLevel = (int)Math.Max(0, Math.Floor(maxZoomLevel));
var adjustedLargestSize = (int)Math.Round(Math.Pow(2, adjustedMaxZoomLevel) * TilePixelSize);
if (width != height || largestSize != adjustedLargestSize)
{
masterImage = masterImage.Clone(context => context.Resize(new ResizeOptions
{
Mode = ResizeMode.Pad,
Position = AnchorPositionMode.Center,
Size = new Size(width = adjustedLargestSize, height = adjustedLargestSize),
}));
}
using (var ms = new MemoryStream())
{
masterImage.Save(ms, new PngEncoder());
masterImageBlob = ms.ToArray();
await _blobStorageService.CreateBlobAsync(folderName, "master-file.png", masterImageBlob);
}
// ****************************
// Update Map Entity
// ****************************
// Save png master file.
map.MaxZoomLevel = adjustedMaxZoomLevel;
map.AdjustedSize = adjustedLargestSize;
map.WorldFolderPath = $"{_configuration.GetValue<string>("AzureBlobBaseURL")}/map{map.MapId}";
map.ThumbnailPath = $"{map.WorldFolderPath}/0_zoom-level.png";
await _tableStorageService.UpdateMapRecordAsync(map);
// ****************************************
// Create Tile Entities
// ****************************************
// Iterate through zoom levels to create required tiles
for (var zoomLevel = 0; zoomLevel <= map.MaxZoomLevel; zoomLevel++)
{
// Calculate the number of tiles required for this zoom level
var numberOfTilesPerDimension = (int)Math.Pow(2, zoomLevel);
for (var x = 0; x < numberOfTilesPerDimension; x++)
{
for (var y = 0; y < numberOfTilesPerDimension; y++)
{
var tile = new Tile
{
MapId = map.MapId,
ZoomLevel = zoomLevel,
IsRendered = false,
TileSize = TilePixelSize,
X = x,
Y = y,
};
await _tableStorageService.CreateTileRecordAsync(tile);
}
}
}
await _queueStorageService.QueueMapForProcessing(map);
return map.MapId;
}
/// <summary>
/// Saves changes to the specified map. Only map owner may save changes.
/// </summary>
/// <param name="map">The map entity to save.</param>
/// <param name="user">The authenticated user.</param>
/// <returns>
/// <c>id</c> if successful, <c>false</c> otherwise.
/// </returns>
public async Task<bool> Save(Map map, ClaimsPrincipal user)
{
// Ensure user is authenticated
var userid = _userManagerService.GetUserId(user);
if (userid == null)
{
_loggerService.LogError("Database operation prohibited for non-authenticated user");
return false;
}
// Determine if the user has rights to delete the map
if (!map.UserId.Equals(userid))
{
_loggerService.LogError($"User {userid} does not have rights to delete map with id:{map.MapId}.");
return false;
}
await _tableStorageService.UpdateMapRecordAsync(map);
return true;
}
/// <summary>
/// Determines if user owns the map.
/// </summary>
/// <param name="mapId">The map identifier.</param>
/// <param name="user">The authenticated user.</param>
/// <returns>
/// <c>id</c> if successful, <c>false</c> otherwise.
/// </returns>
public async Task<bool> CanEdit(string mapId, ClaimsPrincipal user)
{
// Ensure user is authenticated
var userid = _userManagerService.GetUserId(user);
if (userid == null)
{
_loggerService.LogError("Database operation prohibited for non-authenticated user");
return false;
}
// Retrieve the map entry and any associated markers.
var map = await _tableStorageService.GetMapRecordAsync(mapId);
// Ensure map has been found
if (map == null)
{
_loggerService.LogError($"Map with id:{mapId} not found");
return false;
}
// Determine if the user has rights to delete the map
if (!map.UserId.Equals(userid))
{
_loggerService.LogError($"User {userid} does not have rights to delete map with id:{mapId}.");
return false;
}
return true;
}
/// <summary>Determines if user has rights to view the map.</summary>
/// <param name="mapId">The map identifier.</param>
/// <param name="user">The authenticated user.</param>
/// <param name="shareKey">The map's secret key.</param>
/// <returns><c>true</c> if successful, <c>false</c> otherwise.</returns>
public async Task<bool> CanView(string mapId, ClaimsPrincipal user, string shareKey)
{
// Retrieve the map entry and any associated markers.
var map = await _tableStorageService.GetMapRecordAsync(mapId);
// Ensure map has been found
if (map == null)
{
_loggerService.LogError($"Map with id:{mapId} not found");
return false;
}
// Determine if this is a public map
if (map.IsPublic)
{
return true;
}
// Determine if provided secret matches
var isSecretProvided = !string.IsNullOrEmpty(shareKey);
if (isSecretProvided && map.ShareKey.Equals(shareKey))
{
return true;
}
// Determine if user is authenticated
var userid = _userManagerService.GetUserId(user);
// Determine if the user has rights to delete the map
if (!map.UserId.Equals(userid))
{
_loggerService.LogError($"User {userid} does not have rights to delete map with id:{mapId}.");
return false;
}
return true;
}
/// <summary>
/// Initializes the repository if required.
/// </summary>
/// <param name="mapImagePath">Path to sample map image file.</param>
/// <param name="mapDataPath">Path to sample map json file.</param>
/// <returns>True if successful, false otherwise.</returns>
public async Task<bool> InitRepository(string mapImagePath, string mapDataPath)
{
//// Ensure sample map has been created
var sampleMap = await _tableStorageService.GetMapRecordAsync("sample");
if (sampleMap == null)
{
var sampleImage = File.ReadAllBytes(mapImagePath);
var sampleJSON = File.ReadAllText(mapDataPath);
var map = new Map()
{
Copyright = string.Empty,
MarkerData = sampleJSON,
IsPublic = true,
Name = "Sample",
RepeatMapInX = false,
ShareKey = "lNtqjEVQ",
MapId = "sample",
};
using (var ms = new MemoryStream(sampleImage))
{
await Create(map, ms, _userManagerService.GetSystemUser());
}
}
return true;
}
}
} | 40.046256 | 126 | 0.546945 | [
"Apache-2.0"
] | open-campaign-logger/world-map | src/CampaignKit.WorldMap.Core/Data/DefaultMapRepository.cs | 18,183 | C# |
// *****************************************************************************
// BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
// © Component Factory Pty Ltd, 2006-2019, All rights reserved.
// The software and associated documentation supplied hereunder are the
// proprietary information of Component Factory Pty Ltd, 13 Swallows Close,
// Mornington, Vic 3931, Australia and are supplied subject to license terms.
//
// Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV) 2017 - 2019. All rights reserved. (https://github.com/Wagnerp/Krypton-NET-5.472)
// Version 5.472.0.0 www.ComponentFactory.com
// *****************************************************************************
using System;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections.Generic;
using ComponentFactory.Krypton.Toolkit;
using ComponentFactory.Krypton.Navigator;
namespace ComponentFactory.Krypton.Workspace
{
internal class KryptonWorkspaceCollectionEditor : CollectionEditor
{
#region Classes
/// <summary>
/// Form used for editing the KryptonWorkspaceCollection.
/// </summary>
protected partial class KryptonWorkspaceCollectionForm : CollectionForm
{
#region Types
/// <summary>
/// Simple class to reduce the length of declaractions!
/// </summary>
protected class DictItemBase : Dictionary<Component, Component> { };
/// <summary>
/// Act as proxy for krypton page item to control the exposed properties to the property grid.
/// </summary>
protected class PageProxy
{
#region Instance Fields
private readonly KryptonPage _item;
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the PageProxy class.
/// </summary>
/// <param name="item">Item to act as proxy for.</param>
public PageProxy(KryptonPage item)
{
_item = item;
}
#endregion
#region Public
/// <summary>
/// Gets access to the common page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorRedirect StateCommon => _item.StateCommon;
/// <summary>
/// Gets access to the disabled page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigator StateDisabled => _item.StateDisabled;
/// <summary>
/// Gets access to the normal page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigator StateNormal => _item.StateNormal;
/// <summary>
/// Gets access to the tracking page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOtherEx StateTracking => _item.StateTracking;
/// <summary>
/// Gets access to the pressed page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOtherEx StatePressed => _item.StatePressed;
/// <summary>
/// Gets access to the selected page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOther StateSelected => _item.StateSelected;
/// <summary>
/// Gets access to the focus page appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOtherRedirect OverrideFocus => _item.OverrideFocus;
/// <summary>
/// Gets and sets the page text.
/// </summary>
[Category("Appearance")]
[DefaultValue("Page")]
public string Text
{
get => _item.Text;
set => _item.Text = value;
}
/// <summary>
/// Gets and sets the title text for the page.
/// </summary>
[Category("Appearance")]
[DefaultValue("Page Title")]
public string TextTitle
{
get => _item.TextTitle;
set => _item.TextTitle = value;
}
/// <summary>
/// Gets and sets the description text for the page.
/// </summary>
[Category("Appearance")]
[DefaultValue("Page Description")]
public string TextDescription
{
get => _item.TextDescription;
set => _item.TextDescription = value;
}
/// <summary>
/// Gets and sets the small image for the page.
/// </summary>
[Category("Appearance")]
[DefaultValue(null)]
public Image ImageSmall
{
get => _item.ImageSmall;
set => _item.ImageSmall = value;
}
/// <summary>
/// Gets and sets the medium image for the page.
/// </summary>
[Category("Appearance")]
[DefaultValue(null)]
public Image ImageMedium
{
get => _item.ImageMedium;
set => _item.ImageMedium = value;
}
/// <summary>
/// Gets and sets the large image for the page.
/// </summary>
[Category("Appearance")]
[DefaultValue(null)]
public Image ImageLarge
{
get => _item.ImageLarge;
set => _item.ImageLarge = value;
}
/// <summary>
/// Gets and sets the page tooltip image.
/// </summary>
[Category("Appearance")]
[DefaultValue(null)]
public Image ToolTipImage
{
get => _item.ToolTipImage;
set => _item.ToolTipImage = value;
}
/// <summary>
/// Gets and sets the tooltip image transparent color.
/// </summary>
[Category("Appearance")]
[Description("Page tooltip image transparent color.")]
public Color ToolTipImageTransparentColor
{
get => _item.ToolTipImageTransparentColor;
set => _item.ToolTipImageTransparentColor = value;
}
/// <summary>
/// Gets and sets the page tooltip title text.
/// </summary>
[Category("Appearance")]
[Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[DefaultValue("")]
public string ToolTipTitle
{
get => _item.ToolTipTitle;
set => _item.ToolTipTitle = value;
}
/// <summary>
/// Gets and sets the page tooltip body text.
/// </summary>
[Category("Appearance")]
[Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[DefaultValue("")]
public string ToolTipBody
{
get => _item.ToolTipBody;
set => _item.ToolTipBody = value;
}
/// <summary>
/// Gets and sets the tooltip label style.
/// </summary>
[Category("Appearance")]
[DefaultValue(typeof(LabelStyle), "ToolTip")]
public LabelStyle ToolTipStyle
{
get => _item.ToolTipStyle;
set => _item.ToolTipStyle = value;
}
/// <summary>
/// Gets and sets the unique name of the page.
/// </summary>
[Category("Appearance")]
public string UniqueName
{
get => _item.UniqueName;
set => _item.UniqueName = value;
}
/// <summary>
/// Gets and sets if the page should be shown.
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
public bool Visible
{
get => _item.LastVisibleSet;
set => _item.LastVisibleSet = value;
}
/// <summary>
/// Gets and sets if the page should be enabled.
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
public bool Enabled
{
get => _item.Enabled;
set => _item.Enabled = value;
}
/// <summary>
/// Gets and sets the KryptonContextMenu to show when right clicked.
/// </summary>
[Category("Behavior")]
[DefaultValue(null)]
public KryptonContextMenu KryptonContextMenu
{
get => _item.KryptonContextMenu;
set => _item.KryptonContextMenu = value;
}
/// <summary>
/// Gets or sets the size that is the lower limit that GetPreferredSize can specify.
/// </summary>
[Category("Layout")]
[DefaultValue(typeof(Size), "50,50")]
public Size MinimumSize
{
get => _item.MinimumSize;
set => _item.MinimumSize = value;
}
/// <summary>
/// Gets or sets the size that is the upper limit that GetPreferredSize can specify.
/// </summary>
[Category("Layout")]
[DefaultValue(typeof(Size), "0,0")]
public Size MaximumSize
{
get => _item.MaximumSize;
set => _item.MaximumSize = value;
}
/// <summary>
/// Gets or sets the page padding.
/// </summary>
[Category("Layout")]
[DefaultValue(typeof(Padding), "0,0,0,0")]
public Padding Padding
{
get => _item.Padding;
set => _item.Padding = value;
}
/// <summary>
/// Gets and sets user-defined data associated with the object.
/// </summary>
[Category("Data")]
[TypeConverter(typeof(StringConverter))]
[DefaultValue(null)]
public object Tag
{
get => _item.Tag;
set => _item.Tag = value;
}
#endregion
}
/// <summary>
/// Act as proxy for workspace cell item to control the exposed properties to the property grid.
/// </summary>
protected class CellProxy
{
#region Instance Fields
private readonly KryptonWorkspaceCell _item;
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the CellProxy class.
/// </summary>
/// <param name="item">Item to act as proxy for.</param>
public CellProxy(KryptonWorkspaceCell item)
{
_item = item;
}
#endregion
#region Public
/// <summary>
/// Gets or sets the size that is the lower limit that GetPreferredSize can specify.
/// </summary>
[Category("Layout")]
[DefaultValue(typeof(Size), "0,0")]
public Size MinimumSize
{
get => _item.MinimumSize;
set => _item.MinimumSize = value;
}
/// <summary>
/// Gets or sets the size that is the upper limit that GetPreferredSize can specify.
/// </summary>
[Category("Layout")]
[DefaultValue(typeof(Size), "0,0")]
public Size MaximumSize
{
get => _item.MaximumSize;
set => _item.MaximumSize = value;
}
/// <summary>
/// Gets and sets if the user can a separator to resize this workspace cell.
/// </summary>
[Category("Visuals")]
[DefaultValue(true)]
public bool AllowResizing
{
get => _item.AllowResizing;
set => _item.AllowResizing = value;
}
/// <summary>
/// Star notation the describes the sizing of the workspace item.
/// </summary>
[Category("Workspace")]
[DefaultValue("50*,50*")]
public string StarSize
{
get => _item.StarSize;
set => _item.StarSize = value;
}
/// <summary>
/// Should the item be disposed when it is removed from the workspace.
/// </summary>
[Category("Workspace")]
[DefaultValue(true)]
public bool DisposeOnRemove
{
get => _item.DisposeOnRemove;
set => _item.DisposeOnRemove = value;
}
/// <summary>
/// Gets access to the bar specific settings.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorBar Bar => _item.Bar;
/// <summary>
/// Gets access to the stack specific settings.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorStack Stack => _item.Stack;
/// <summary>
/// Gets access to the outlook mode specific settings.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorOutlook Outlook => _item.Outlook;
/// <summary>
/// Gets access to button specifications and fixed button logic.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorButton Button => _item.Button;
/// <summary>
/// Gets access to the group specific settings.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorGroup Group => _item.Group;
/// <summary>
/// Gets access to the header specific settings.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorHeader Header => _item.Header;
/// <summary>
/// Gets access to the panels specific settings.
/// </summary>
[Category("Visuals (Modes)")]
public NavigatorPanel Panel => _item.Panel;
/// <summary>
/// Gets access to the popup page specific settings.
/// </summary>
[Category("Visuals")]
public NavigatorPopupPages PopupPages => _item.PopupPages;
/// <summary>
/// Gets access to the tooltip specific settings.
/// </summary>
[Category("Visuals")]
public NavigatorToolTips ToolTips => _item.ToolTips;
/// <summary>
/// Gets access to the common navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorRedirect StateCommon => _item.StateCommon;
/// <summary>
/// Gets access to the disabled navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigator StateDisabled => _item.StateDisabled;
/// <summary>
/// Gets access to the normal navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigator StateNormal => _item.StateNormal;
/// <summary>
/// Gets access to the tracking navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOtherEx StateTracking => _item.StateTracking;
/// <summary>
/// Gets access to the pressed navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOtherEx StatePressed => _item.StatePressed;
/// <summary>
/// Gets access to the selected navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOther StateSelected => _item.StateSelected;
/// <summary>
/// Gets access to the focus navigator appearance entries.
/// </summary>
[Category("Visuals")]
public PaletteNavigatorOtherRedirect OverrideFocus => _item.OverrideFocus;
/// <summary>
/// Gets and sets the display mode.
/// </summary>
[Category("Visuals")]
[DefaultValue(typeof(NavigatorMode), "BarTabGroup")]
public NavigatorMode NavigatorMode
{
get => _item.NavigatorMode;
set => _item.NavigatorMode = value;
}
/// <summary>
/// Gets and sets the page background style.
/// </summary>
[Category("Visuals")]
[DefaultValue(typeof(PaletteBackStyle), "ControlClient")]
public PaletteBackStyle PageBackStyle
{
get => _item.PageBackStyle;
set => _item.PageBackStyle = value;
}
/// <summary>
/// Gets or sets the default setting for allowing the page dragging from of the navigator.
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
public bool AllowPageDrag
{
get => _item.AllowPageDrag;
set => _item.AllowPageDrag = value;
}
/// <summary>
/// Gets or sets if the tab headers are allowed to take the focus.
/// </summary>
[Category("Behavior")]
[DefaultValue(false)]
public bool AllowTabFocus
{
get => _item.AllowTabFocus;
set => _item.AllowTabFocus = value;
}
/// <summary>
/// Gets and sets if the cell should be shown.
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
public bool Visible
{
get => _item.LastVisibleSet;
set => _item.LastVisibleSet = value;
}
/// <summary>
/// Gets and sets if the cell should be enabled.
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
public bool Enabled
{
get => _item.Enabled;
set => _item.Enabled = value;
}
/// <summary>
/// Gets and sets if the cell selected page.
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
public KryptonPage SelectedPage
{
get => _item.SelectedPage;
set
{
// Check that the target cell allows selected tabs
if (_item.AllowTabSelect)
{
_item.SelectedPage = value;
}
}
}
/// <summary>
/// Gets and sets the KryptonContextMenu to show when right clicked.
/// </summary>
[Category("Behavior")]
[DefaultValue(null)]
public KryptonContextMenu KryptonContextMenu
{
get => _item.KryptonContextMenu;
set => _item.KryptonContextMenu = value;
}
/// <summary>
/// Gets or sets a value indicating whether mnemonics select pages and button specs.
/// </summary>
[Category("Appearance")]
[DefaultValue(true)]
public bool UseMnemonic
{
get => _item.UseMnemonic;
set => _item.UseMnemonic = value;
}
/// <summary>
/// Gets and sets user-defined data associated with the object.
/// </summary>
[Category("Data")]
[TypeConverter(typeof(StringConverter))]
[DefaultValue(null)]
public object Tag
{
get => _item.Tag;
set => _item.Tag = value;
}
#endregion
}
/// <summary>
/// Act as proxy for workspace sequence item to control the exposed properties to the property grid.
/// </summary>
protected class SequenceProxy
{
#region Instance Fields
private readonly KryptonWorkspaceSequence _item;
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the SequenceProxy class.
/// </summary>
/// <param name="item">Item to act as proxy for.</param>
public SequenceProxy(KryptonWorkspaceSequence item)
{
_item = item;
}
#endregion
#region Public
/// <summary>
/// Gets or sets a value indicating whether the sequence is displayed.
/// </summary>
[Category("Visuals")]
[DefaultValue(true)]
public bool Visible
{
get => _item.Visible;
set => _item.Visible = value;
}
/// <summary>
/// Gets and sets the orientation for laying out the child entries.
/// </summary>
[Category("Workspace")]
[DefaultValue(typeof(Orientation), "Horizontal")]
public Orientation Orientation
{
get => _item.Orientation;
set => _item.Orientation = value;
}
/// <summary>
/// Star notation the describes the sizing of the workspace item.
/// </summary>
[Category("Workspace")]
[DefaultValue("50*,50*")]
public string StarSize
{
get => _item.StarSize;
set => _item.StarSize = value;
}
#endregion
}
/// <summary>
/// Tree node that is attached to a context menu item.
/// </summary>
protected class MenuTreeNode : TreeNode
{
#region Static Fields
private static int _id = 1;
#endregion
#region Instance Fields
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the MenuTreeNode class.
/// </summary>
/// <param name="item">Item to represent.</param>
public MenuTreeNode(Component item)
{
InstanceId = _id++;
PageItem = item as KryptonPage;
if (PageItem != null)
{
PageItem.TextChanged += OnPageTextChanged;
Text = "Page (" + PageItem.Text.ToString() + ")";
}
CellItem = item as KryptonWorkspaceCell;
if (CellItem != null)
{
CellItem.PropertyChanged += OnCellPropertyChanged;
Text = "Cell (" + CellItem.StarSize.ToString() + ")";
}
SequenceItem = item as KryptonWorkspaceSequence;
if (SequenceItem != null)
{
SequenceItem.PropertyChanged += OnSequencePropertyChanged;
Text = SequenceItem.Orientation + " (" + SequenceItem.StarSize.ToString() + ")";
}
}
#endregion
#region Public
/// <summary>
/// Gets access to the associated workspace cell item.
/// </summary>
public Component Item => (PageItem != null ? PageItem : (CellItem != null ? CellItem : (Component)SequenceItem));
/// <summary>
/// Gets access to the associated workspace cell item.
/// </summary>
public KryptonPage PageItem { get; }
/// <summary>
/// Gets access to the associated workspace cell item.
/// </summary>
public KryptonWorkspaceCell CellItem { get; }
/// <summary>
/// Gets access to the associated workspace sequence item.
/// </summary>
public KryptonWorkspaceSequence SequenceItem { get; }
/// <summary>
/// Gets the instance identifier.
/// </summary>
public int InstanceId { get; }
#endregion
#region Implementation
private void OnPageTextChanged(object sender, EventArgs e)
{
Text = "Page (" + PageItem.Text.ToString() + ")";
}
private void OnCellPropertyChanged(object sender, PropertyChangedEventArgs e)
{
Text = "Cell (" + CellItem.StarSize.ToString() + ")";
}
private void OnSequencePropertyChanged(object sender, PropertyChangedEventArgs e)
{
Text = SequenceItem.Orientation + " (" + SequenceItem.StarSize.ToString() + ")";
}
#endregion
}
/// <summary>
/// Site that allows the property grid to discover Visual Studio services.
/// </summary>
protected class PropertyGridSite : ISite, IServiceProvider
{
#region Instance Fields
private readonly IServiceProvider _serviceProvider;
private bool _inGetService;
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the PropertyGridSite.
/// </summary>
/// <param name="servicePovider">Reference to service container.</param>
/// <param name="component">Reference to component.</param>
public PropertyGridSite(IServiceProvider servicePovider,
IComponent component)
{
_serviceProvider = servicePovider;
Component = component;
}
#endregion
#region Public
/// <summary>
/// Gets the service object of the specified type.
/// </summary>
/// <param name="t">An object that specifies the type of service object to get. </param>
/// <returns>A service object of type serviceType; or null reference if there is no service object of type serviceType.</returns>
public object GetService(Type t)
{
if (!_inGetService && (_serviceProvider != null))
{
try
{
_inGetService = true;
return _serviceProvider.GetService(t);
}
finally
{
_inGetService = false;
}
}
return null;
}
/// <summary>
/// Gets the component associated with the ISite when implemented by a class.
/// </summary>
public IComponent Component { get; }
/// <summary>
/// Gets the IContainer associated with the ISite when implemented by a class.
/// </summary>
public IContainer Container => null;
/// <summary>
/// Determines whether the component is in design mode when implemented by a class.
/// </summary>
public bool DesignMode => false;
/// <summary>
/// Gets or sets the name of the component associated with the ISite when implemented by a class.
/// </summary>
public string Name
{
get { return null; }
set { }
}
#endregion
}
#endregion
#region Instance Fields
private readonly KryptonWorkspaceCollectionEditor _editor;
private DictItemBase _beforeItems;
private readonly TreeView treeView;
private readonly PropertyGrid propertyGrid;
private readonly Button buttonMoveUp;
private readonly Button buttonMoveDown;
private readonly Button buttonAddPage;
private readonly Button buttonAddCell;
private readonly Button buttonAddSequence;
private readonly Button buttonOK;
private readonly Button buttonDelete;
private readonly Label labelItemProperties;
private readonly Label labelWorkspaceCollection;
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the KryptonWorkspaceCollectionForm class.
/// </summary>
public KryptonWorkspaceCollectionForm(KryptonWorkspaceCollectionEditor editor)
: base(editor)
{
_editor = editor;
buttonOK = new Button();
treeView = new TreeView();
buttonMoveUp = new Button();
buttonMoveDown = new Button();
buttonAddPage = new Button();
buttonAddCell = new Button();
buttonAddSequence = new Button();
buttonDelete = new Button();
propertyGrid = new PropertyGrid();
labelItemProperties = new Label();
labelWorkspaceCollection = new Label();
SuspendLayout();
//
// buttonOK
//
buttonOK.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonOK.DialogResult = DialogResult.OK;
buttonOK.Location = new Point(547, 382);
buttonOK.Name = "buttonOK";
buttonOK.Size = new Size(75, 23);
buttonOK.TabIndex = 8;
buttonOK.Text = "OK";
buttonOK.UseVisualStyleBackColor = true;
buttonOK.Click += buttonOK_Click;
//
// treeView
//
treeView.Anchor = ((AnchorStyles.Top | AnchorStyles.Bottom)
| AnchorStyles.Left)
| AnchorStyles.Right;
treeView.Location = new Point(12, 32);
treeView.Name = "treeView";
treeView.Size = new Size(251, 339);
treeView.TabIndex = 1;
treeView.HideSelection = false;
treeView.AfterSelect += treeView_AfterSelect;
//
// buttonMoveUp
//
buttonMoveUp.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonMoveUp.Image = Properties.Resources.arrow_up_blue;
buttonMoveUp.ImageAlign = ContentAlignment.MiddleLeft;
buttonMoveUp.Location = new Point(272, 32);
buttonMoveUp.Name = "buttonMoveUp";
buttonMoveUp.Size = new Size(95, 28);
buttonMoveUp.TabIndex = 2;
buttonMoveUp.Text = " Move Up";
buttonMoveUp.TextAlign = ContentAlignment.MiddleLeft;
buttonMoveUp.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonMoveUp.UseVisualStyleBackColor = true;
buttonMoveUp.Click += buttonMoveUp_Click;
//
// buttonMoveDown
//
buttonMoveDown.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonMoveDown.Image = Properties.Resources.arrow_down_blue;
buttonMoveDown.ImageAlign = ContentAlignment.MiddleLeft;
buttonMoveDown.Location = new Point(272, 66);
buttonMoveDown.Name = "buttonMoveDown";
buttonMoveDown.Size = new Size(95, 28);
buttonMoveDown.TabIndex = 3;
buttonMoveDown.Text = " Move Down";
buttonMoveDown.TextAlign = ContentAlignment.MiddleLeft;
buttonMoveDown.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonMoveDown.UseVisualStyleBackColor = true;
buttonMoveDown.Click += buttonMoveDown_Click;
//
// buttonDelete
//
buttonDelete.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonDelete.Image = Properties.Resources.delete2;
buttonDelete.ImageAlign = ContentAlignment.MiddleLeft;
buttonDelete.Location = new Point(272, 234);
buttonDelete.Name = "buttonDelete";
buttonDelete.Size = new Size(95, 28);
buttonDelete.TabIndex = 5;
buttonDelete.Text = " Delete Item";
buttonDelete.TextAlign = ContentAlignment.MiddleLeft;
buttonDelete.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonDelete.UseVisualStyleBackColor = true;
buttonDelete.Click += buttonDelete_Click;
//
// propertyGrid
//
propertyGrid.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom)
| AnchorStyles.Right;
propertyGrid.HelpVisible = false;
propertyGrid.Location = new Point(376, 32);
propertyGrid.Name = "propertyGrid";
propertyGrid.Size = new Size(246, 339);
propertyGrid.TabIndex = 7;
propertyGrid.ToolbarVisible = false;
//
// labelItemProperties
//
labelItemProperties.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelItemProperties.AutoSize = true;
labelItemProperties.Location = new Point(370, 13);
labelItemProperties.Name = "labelItemProperties";
labelItemProperties.Size = new Size(81, 13);
labelItemProperties.TabIndex = 6;
labelItemProperties.Text = "Item Properties";
//
// labelWorkspaceCollection
//
labelWorkspaceCollection.AutoSize = true;
labelWorkspaceCollection.Location = new Point(12, 13);
labelWorkspaceCollection.Name = "labelWorkspaceCollection";
labelWorkspaceCollection.Size = new Size(142, 13);
labelWorkspaceCollection.TabIndex = 0;
labelWorkspaceCollection.Text = "Workspace Collection";
//
// buttonAddPage
//
buttonAddPage.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonAddPage.Image = Properties.Resources.add;
buttonAddPage.ImageAlign = ContentAlignment.MiddleLeft;
buttonAddPage.Location = new Point(272, 114);
buttonAddPage.Name = "buttonAddPage";
buttonAddPage.Size = new Size(95, 28);
buttonAddPage.TabIndex = 4;
buttonAddPage.Text = " Page";
buttonAddPage.TextAlign = ContentAlignment.MiddleLeft;
buttonAddPage.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonAddPage.UseVisualStyleBackColor = true;
buttonAddPage.Click += buttonAddPage_Click;
//
// buttonAddCell
//
buttonAddCell.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonAddCell.Image = Properties.Resources.add;
buttonAddCell.ImageAlign = ContentAlignment.MiddleLeft;
buttonAddCell.Location = new Point(272, 148);
buttonAddCell.Name = "buttonAddCell";
buttonAddCell.Size = new Size(95, 28);
buttonAddCell.TabIndex = 9;
buttonAddCell.Text = " Cell";
buttonAddCell.TextAlign = ContentAlignment.MiddleLeft;
buttonAddCell.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonAddCell.UseVisualStyleBackColor = true;
buttonAddCell.Click += buttonAddCell_Click;
//
// buttonAddSequence
//
buttonAddSequence.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonAddSequence.Image = Properties.Resources.add;
buttonAddSequence.ImageAlign = ContentAlignment.MiddleLeft;
buttonAddSequence.Location = new Point(272, 182);
buttonAddSequence.Name = "buttonAddSequence";
buttonAddSequence.Size = new Size(95, 28);
buttonAddSequence.TabIndex = 9;
buttonAddSequence.Text = " Sequence";
buttonAddSequence.TextAlign = ContentAlignment.MiddleLeft;
buttonAddSequence.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonAddSequence.UseVisualStyleBackColor = true;
buttonAddSequence.Click += buttonAddSequence_Click;
AcceptButton = buttonOK;
AutoScaleDimensions = new SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(634, 414);
ControlBox = false;
Controls.Add(treeView);
Controls.Add(buttonMoveUp);
Controls.Add(buttonMoveDown);
Controls.Add(buttonAddPage);
Controls.Add(buttonAddCell);
Controls.Add(buttonAddSequence);
Controls.Add(propertyGrid);
Controls.Add(buttonDelete);
Controls.Add(buttonOK);
Controls.Add(labelWorkspaceCollection);
Controls.Add(labelItemProperties);
VisibleChanged += OnVisibleChanged;
Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
MinimumSize = new Size(501, 344);
Name = "KryptonWorkspaceCollectionForm";
StartPosition = FormStartPosition.CenterScreen;
Text = "Workspace Collection Editor";
ResumeLayout(false);
PerformLayout();
}
#endregion
#region Protected Overrides
/// <summary>
/// Provides an opportunity to perform processing when a collection value has changed.
/// </summary>
protected override void OnEditValueChanged()
{
if (EditValue != null)
{
// Need to link the property browser to a site otherwise Image properties cannot be
// edited because it cannot navigate to the owning project for its resources
propertyGrid.Site = new PropertyGridSite(Context, propertyGrid);
// Cache a lookup of all items before changes are made
_beforeItems = CreateItemsDictionary(Items);
// Add all the top level clones
treeView.Nodes.Clear();
foreach (Component item in Items)
{
AddMenuTreeNode(item, null);
}
// Expand to show all entries
treeView.ExpandAll();
// Select the first node
if (treeView.Nodes.Count > 0)
{
treeView.SelectedNode = treeView.Nodes[0];
}
UpdateButtons();
UpdatePropertyGrid();
}
}
#endregion
#region Implementation
private void OnVisibleChanged(object sender, EventArgs e)
{
if (Visible)
{
_editor.Workspace.SuspendWorkspaceLayout();
}
else
{
_editor.Workspace.ResumeWorkspaceLayout();
}
}
private void buttonOK_Click(object sender, EventArgs e)
{
// Create an array with all the root items
object[] rootItems = new object[treeView.Nodes.Count];
for (int i = 0; i < rootItems.Length; i++)
{
rootItems[i] = ((MenuTreeNode)treeView.Nodes[i]).Item;
}
// Cache a lookup of all items after changes are made
DictItemBase afterItems = CreateItemsDictionary(rootItems);
// Update collection with new set of items
Items = rootItems;
// Inform designer of changes in component items
SynchronizeCollections(_beforeItems, afterItems, Context);
// Notify container that the value has been changed
Context.OnComponentChanged();
// Clear down contents of tree as this form can be reused
treeView.Nodes.Clear();
}
private void buttonMoveUp_Click(object sender, EventArgs e)
{
// If we have a selected node
MenuTreeNode node = (MenuTreeNode)treeView.SelectedNode;
if (node != null)
{
NodeToType(node, out bool isNodePage, out bool isNodeCell, out bool isNodeSequence);
// Find the previous node compatible as target for the selected node
MenuTreeNode previousNode = (MenuTreeNode)PreviousNode(node);
if (previousNode != null)
{
NodeToType(previousNode, out bool isPreviousPage, out bool isPreviousCell, out bool isPreviousSequence);
// If moving a page...
if (isNodePage)
{
// Remove page from parent cell
MenuTreeNode parentNode = (MenuTreeNode)node.Parent;
parentNode.CellItem.Pages.Remove(node.PageItem);
parentNode.Nodes.Remove(node);
// If the previous node is also a page
if (isPreviousPage)
{
// Add page to the parent cell of target page
MenuTreeNode previousParent = (MenuTreeNode)previousNode.Parent;
int pageIndex = previousParent.CellItem.Pages.IndexOf(previousNode.PageItem);
// If the current and previous nodes are inside different cells
if (previousParent != parentNode)
{
// If the page is the last one in the collection then we need to insert afterwards
if (pageIndex == (previousParent.CellItem.Pages.Count - 1))
{
pageIndex++;
}
}
previousParent.CellItem.Pages.Insert(pageIndex, node.PageItem);
previousParent.Nodes.Insert(pageIndex, node);
}
else if (isPreviousCell)
{
// Add page as last item of target cell
parentNode = previousNode;
parentNode.CellItem.Pages.Insert(parentNode.CellItem.Pages.Count, node.PageItem);
parentNode.Nodes.Insert(parentNode.Nodes.Count, node);
}
}
else if (isNodeCell)
{
// Is the current node contained inside the next node
bool contained = ContainsNode(previousNode, node);
// Remove cell from parent collection
MenuTreeNode parentNode = (MenuTreeNode)node.Parent;
TreeNodeCollection parentCollection = (node.Parent == null ? treeView.Nodes : node.Parent.Nodes);
parentNode?.SequenceItem.Children.Remove(node.CellItem);
parentCollection.Remove(node);
// If the previous node is also a cell
if (isPreviousCell || contained)
{
// Add cell to the parent sequence of target cell
MenuTreeNode previousParent = (MenuTreeNode)previousNode.Parent;
parentCollection = (previousNode.Parent == null ? treeView.Nodes : previousNode.Parent.Nodes);
int pageIndex = parentCollection.IndexOf(previousNode);
// If the current and previous nodes are inside different cells
if (!contained && ((previousParent != null) && (previousParent != parentNode)))
{
// If the page is the last one in the collection then we need to insert afterwards
if (pageIndex == (previousParent.SequenceItem.Children.Count - 1))
{
pageIndex++;
}
}
previousParent?.SequenceItem.Children.Insert(pageIndex, node.CellItem);
parentCollection.Insert(pageIndex, node);
}
else if (isPreviousSequence)
{
// Add cell as last item of target sequence
parentNode = previousNode;
parentNode.SequenceItem.Children.Insert(parentNode.SequenceItem.Children.Count, node.CellItem);
parentNode.Nodes.Insert(parentNode.Nodes.Count, node);
}
}
else if (isNodeSequence)
{
// Is the current node contained inside the next node
bool contained = ContainsNode(previousNode, node);
// Remove sequence from parent collection
MenuTreeNode parentNode = (MenuTreeNode)node.Parent;
TreeNodeCollection parentCollection = (node.Parent == null ? treeView.Nodes : node.Parent.Nodes);
parentNode?.SequenceItem.Children.Remove(node.SequenceItem);
parentCollection.Remove(node);
// If the previous node is also a sequence
if (isPreviousCell || contained)
{
// Add sequence to the parent sequence of target cell
MenuTreeNode previousParent = (MenuTreeNode)previousNode.Parent;
parentCollection = (previousNode.Parent == null ? treeView.Nodes : previousNode.Parent.Nodes);
int pageIndex = parentCollection.IndexOf(previousNode);
// If the current and previous nodes are inside different cells
if (!contained && ((previousParent != null) && (previousParent != parentNode)))
{
// If the page is the last one in the collection then we need to insert afterwards
if (pageIndex == (previousParent.SequenceItem.Children.Count - 1))
{
pageIndex++;
}
}
previousParent?.SequenceItem.Children.Insert(pageIndex, node.SequenceItem);
parentCollection.Insert(pageIndex, node);
}
else if (isPreviousSequence)
{
// Add sequence as last item of target sequence
parentNode = previousNode;
parentNode.SequenceItem.Children.Insert(parentNode.SequenceItem.Children.Count, node.SequenceItem);
parentNode.Nodes.Insert(parentNode.Nodes.Count, node);
}
}
}
}
// Ensure the target node is still selected
treeView.SelectedNode = node;
UpdateButtons();
UpdatePropertyGrid();
}
private void buttonMoveDown_Click(object sender, EventArgs e)
{
// If we have a selected node
MenuTreeNode node = (MenuTreeNode)treeView.SelectedNode;
if (node != null)
{
NodeToType(node, out bool isNodePage, out bool isNodeCell, out bool isNodeSequence);
// Find the next node compatible as target for the selected node
MenuTreeNode nextNode = (MenuTreeNode)NextNode(node);
if (nextNode != null)
{
NodeToType(nextNode, out bool isNextPage, out bool isNextCell, out bool isNextSequence);
// If moving a page...
if (isNodePage)
{
// Remove page from parent cell
MenuTreeNode parentNode = (MenuTreeNode)node.Parent;
parentNode.CellItem.Pages.Remove(node.PageItem);
parentNode.Nodes.Remove(node);
// If the next node is also a page
if (isNextPage)
{
// Add page to the parent cell of target page
MenuTreeNode previousParent = (MenuTreeNode)nextNode.Parent;
int pageIndex = previousParent.CellItem.Pages.IndexOf(nextNode.PageItem);
previousParent.CellItem.Pages.Insert(pageIndex + 1, node.PageItem);
previousParent.Nodes.Insert(pageIndex + 1, node);
}
else if (isNextCell)
{
// Add page as first item of target cell
parentNode = nextNode;
parentNode.CellItem.Pages.Insert(0, node.PageItem);
parentNode.Nodes.Insert(0, node);
}
}
else if (isNodeCell)
{
// Is the current node contained inside the next node
bool contained = ContainsNode(nextNode, node);
// Remove cell from parent collection
MenuTreeNode parentNode = (MenuTreeNode)node.Parent;
TreeNodeCollection parentCollection = (node.Parent == null ? treeView.Nodes : node.Parent.Nodes);
parentNode?.SequenceItem.Children.Remove(node.CellItem);
parentCollection.Remove(node);
// If the next node is also a cell
if (isNextCell || contained)
{
// Add cell to the parent sequence of target cell
MenuTreeNode previousParent = (MenuTreeNode)nextNode.Parent;
parentCollection = (nextNode.Parent == null ? treeView.Nodes : nextNode.Parent.Nodes);
int pageIndex = parentCollection.IndexOf(nextNode);
previousParent?.SequenceItem.Children.Insert(pageIndex + 1, node.CellItem);
parentCollection.Insert(pageIndex + 1, node);
}
else if (isNextSequence)
{
// Add cell as first item of target sequence
parentNode = nextNode;
parentNode.SequenceItem.Children.Insert(0, node.CellItem);
parentNode.Nodes.Insert(0, node);
}
}
else if (isNodeSequence)
{
// Is the current node contained inside the next node
bool contained = ContainsNode(nextNode, node);
// Remove sequence from parent collection
MenuTreeNode parentNode = (MenuTreeNode)node.Parent;
TreeNodeCollection parentCollection = (node.Parent == null ? treeView.Nodes : node.Parent.Nodes);
parentNode?.SequenceItem.Children.Remove(node.SequenceItem);
parentCollection.Remove(node);
// If the next node is a cell
if (isNextCell || contained)
{
// Add sequence to the parent sequence of target cell
MenuTreeNode previousParent = (MenuTreeNode)nextNode.Parent;
parentCollection = (nextNode.Parent == null ? treeView.Nodes : nextNode.Parent.Nodes);
int pageIndex = parentCollection.IndexOf(nextNode);
previousParent?.SequenceItem.Children.Insert(pageIndex + 1, node.SequenceItem);
parentCollection.Insert(pageIndex + 1, node);
}
else if (isNextSequence)
{
// Add sequence as first item of target sequence
parentNode = nextNode;
parentNode.SequenceItem.Children.Insert(0, node.SequenceItem);
parentNode.Nodes.Insert(0, node);
}
}
}
}
// Ensure the target node is still selected
treeView.SelectedNode = node;
UpdateButtons();
UpdatePropertyGrid();
}
private void buttonAddPage_Click(object sender, EventArgs e)
{
// Create new page and menu node for the page
KryptonPage page = (KryptonPage)CreateInstance(typeof(KryptonPage));
TreeNode newNode = new MenuTreeNode(page);
MenuTreeNode selectedNode = (MenuTreeNode)treeView.SelectedNode;
if (selectedNode.CellItem != null)
{
// Selected node is a cell, so append page to end of cells page collection
selectedNode.CellItem.Pages.Add(page);
selectedNode.Nodes.Add(newNode);
}
else if (selectedNode.PageItem != null)
{
// Selected node is a page, so insert after this page
MenuTreeNode selectedParentNode = (MenuTreeNode)selectedNode.Parent;
int selectedIndex = selectedParentNode.Nodes.IndexOf(selectedNode);
selectedParentNode.CellItem.Pages.Insert(selectedIndex + 1, page);
selectedParentNode.Nodes.Insert(selectedIndex + 1, newNode);
}
// Selected the newly added node
treeView.SelectedNode = newNode;
treeView.Focus();
UpdateButtons();
UpdatePropertyGrid();
}
private void buttonAddCell_Click(object sender, EventArgs e)
{
// Create new cell and menu node for the cell and two nodes for the child pages
KryptonWorkspaceCell cell = (KryptonWorkspaceCell)CreateInstance(typeof(KryptonWorkspaceCell));
TreeNode newNode = new MenuTreeNode(cell);
// Add each page inside the new cell as a child of the new node
foreach (KryptonPage page in cell.Pages)
{
newNode.Nodes.Add(new MenuTreeNode(page));
}
newNode.Expand();
MenuTreeNode selectedNode = (MenuTreeNode)treeView.SelectedNode;
if (selectedNode == null)
{
// Nothing is selected, so add to the root
treeView.Nodes.Add(newNode);
}
else if (selectedNode.SequenceItem != null)
{
// Selected node is a sequence, so append cell to end of sequence collection
selectedNode.SequenceItem.Children.Add(cell);
selectedNode.Nodes.Add(newNode);
}
else if (selectedNode.CellItem != null)
{
if (selectedNode.Parent == null)
{
// Selected node is cell in root, so insert after it in the root
treeView.Nodes.Insert(treeView.Nodes.IndexOf(selectedNode) + 1, newNode);
}
else
{
// Selected node is a cell, so insert after this cell
MenuTreeNode selectedParentNode = (MenuTreeNode)selectedNode.Parent;
int selectedIndex = selectedParentNode.Nodes.IndexOf(selectedNode);
selectedParentNode.SequenceItem.Children.Insert(selectedIndex + 1, cell);
selectedParentNode.Nodes.Insert(selectedIndex + 1, newNode);
}
}
// Selected the newly added node
treeView.SelectedNode = newNode;
treeView.Focus();
UpdateButtons();
UpdatePropertyGrid();
}
private void buttonAddSequence_Click(object sender, EventArgs e)
{
// Create new sequence and menu node for the sequence
KryptonWorkspaceSequence sequence = (KryptonWorkspaceSequence)CreateInstance(typeof(KryptonWorkspaceSequence));
TreeNode newNode = new MenuTreeNode(sequence);
MenuTreeNode selectedNode = (MenuTreeNode)treeView.SelectedNode;
if (selectedNode == null)
{
// Nothing is selected, so add to the root
treeView.Nodes.Add(newNode);
}
else if (selectedNode.CellItem != null)
{
if (selectedNode.Parent == null)
{
// Selected node is cell in root, so insert after it in the root
treeView.Nodes.Insert(treeView.Nodes.IndexOf(selectedNode) + 1, newNode);
}
else
{
// Selected node is a cell, so insert after this cell
MenuTreeNode selectedParentNode = (MenuTreeNode)selectedNode.Parent;
int selectedIndex = selectedParentNode.Nodes.IndexOf(selectedNode);
selectedParentNode.SequenceItem.Children.Insert(selectedIndex + 1, sequence);
selectedParentNode.Nodes.Insert(selectedIndex + 1, newNode);
}
}
else if (selectedNode.SequenceItem != null)
{
// Selected node is a sequence, so append sequence to end of child collection
selectedNode.SequenceItem.Children.Add(sequence);
selectedNode.Nodes.Add(newNode);
}
// Selected the newly added node
treeView.SelectedNode = newNode;
treeView.Focus();
UpdateButtons();
UpdatePropertyGrid();
}
private void buttonDelete_Click(object sender, EventArgs e)
{
if (treeView.SelectedNode != null)
{
MenuTreeNode treeNode = (MenuTreeNode)treeView.SelectedNode;
if (treeNode.Parent == null)
{
// Remove from the root collection
treeView.Nodes.Remove(treeNode);
}
else
{
// Remove from parent node collection
MenuTreeNode parentNode = (MenuTreeNode)treeNode.Parent;
treeNode.Parent.Nodes.Remove(treeNode);
// Remove item from parent container
if (parentNode.CellItem != null)
{
parentNode.CellItem.Pages.Remove(treeNode.Item);
}
else
{
parentNode.SequenceItem?.Children.Remove(treeNode.Item);
}
}
treeView.Focus();
}
UpdateButtons();
UpdatePropertyGrid();
}
private void treeView_AfterSelect(object sender, TreeViewEventArgs e)
{
UpdateButtons();
UpdatePropertyGrid();
}
private void NodeToType(TreeNode node, out bool isPage, out bool isCell, out bool isSequence)
{
NodeToType((MenuTreeNode)node, out isPage, out isCell, out isSequence);
}
private void NodeToType(MenuTreeNode node, out bool isPage, out bool isCell, out bool isSequence)
{
isPage = node?.PageItem != null;
isCell = node?.CellItem != null;
isSequence = node?.SequenceItem != null;
}
private bool ContainsNode(TreeNode node, TreeNode find)
{
if (node.Nodes.Contains(find))
{
return true;
}
else
{
foreach (TreeNode child in node.Nodes)
{
if (ContainsNode(child, find))
{
return true;
}
}
}
return false;
}
private TreeNode NextNode(TreeNode currentNode)
{
if (currentNode == null)
{
return null;
}
bool found = false;
NodeToType(currentNode, out bool isPage, out bool isCell, out bool isSequence);
TreeNode returnNode = currentNode;
do
{
// Find the previous node
returnNode = RecursiveFind(treeView.Nodes, returnNode, ref found, isPage, isCell, isSequence, true);
// If we actually found a next node
if (returnNode != null)
{
// Cannot move a sequence inside itself
if (isSequence && ContainsNode(currentNode, returnNode))
{
found = false;
continue;
}
}
// Found no reason not the accept the found node
break;
} while (returnNode != null);
return returnNode;
}
private TreeNode PreviousNode(TreeNode currentNode)
{
if (currentNode == null)
{
return null;
}
bool found = false;
NodeToType(currentNode, out bool isPage, out bool isCell, out bool isSequence);
TreeNode returnNode = currentNode;
do
{
// Find the previous node
returnNode = RecursiveFind(treeView.Nodes, returnNode, ref found, isPage, isCell, isSequence, false);
// If we actually found a previous node
if (returnNode != null)
{
// If searching from a page that is the first page in the owning cell and the previous
// node is actually the owning cell of the page then we need to continue with searching
if (isPage && (currentNode.Index == 0) && (returnNode == currentNode.Parent))
{
found = false;
continue;
}
}
// Found no reason not the accept the found node
break;
} while (returnNode != null);
return returnNode;
}
private TreeNode RecursiveFind(TreeNodeCollection nodes,
TreeNode target,
ref bool found,
bool findPage,
bool findCell,
bool findSequence,
bool forward)
{
for (int i = 0; i < nodes.Count; i++)
{
TreeNode node = nodes[forward ? i : nodes.Count - 1 - i];
NodeToType(node, out bool isPage, out bool isCell, out bool isSequence);
// Searching forward we check the node before any child collection
if (forward)
{
if (!found)
{
found |= (node == target);
}
else if ((isPage && findPage) || (isCell && (findPage || findCell)) || (isSequence && (findCell || findSequence)))
{
return node;
}
}
// Do not recurse into the children if looking forwards and at the target sequence
if (!(isSequence && findSequence && found && forward))
{
// Searching the child collection of nodes
TreeNode findNode = RecursiveFind(node.Nodes, target, ref found, findPage, findCell, findSequence, forward);
// If we found a node to return then return it now
if (findNode != null)
{
return findNode;
}
else if (found && (target != node))
{
if ((findCell && (isCell || isSequence)) ||
(findSequence && (isCell || isSequence)))
{
return node;
}
}
// Searching backwards we check the child collection after checking the node
if (!forward)
{
if (!found)
{
found |= (node == target);
}
else if ((isPage && findPage) || (isCell && (findPage || findCell)) || (isSequence && (findCell || findSequence)))
{
return node;
}
}
}
}
return null;
}
private void SeparatorToItems(ViewDrawWorkspaceSeparator separator,
out IWorkspaceItem after,
out IWorkspaceItem before)
{
// Workspace item after the separator (to the right or below)
after = separator.WorkspaceItem;
// Workspace item before the separator (to the left or above)
KryptonWorkspaceSequence beforeSequence = (KryptonWorkspaceSequence)after.WorkspaceParent;
// Previous items might be invisible and so search till we find the visible one we expect
before = null;
for (int i = beforeSequence.Children.IndexOf(after) - 1; i >= 0; i--)
{
if ((beforeSequence.Children[i] is IWorkspaceItem item) && item.WorkspaceVisible)
{
before = item;
break;
}
}
}
private void UpdateButtons()
{
MenuTreeNode node = (MenuTreeNode)treeView.SelectedNode;
bool isNone = (node == null);
bool isPage = node?.PageItem != null;
bool isCell = node?.CellItem != null;
bool isSequence = node?.SequenceItem != null;
buttonMoveUp.Enabled = !isNone && (PreviousNode(node) != null);
buttonMoveDown.Enabled = !isNone && (NextNode(node) != null);
buttonAddPage.Enabled = isPage || isCell;
buttonAddCell.Enabled = isNone || isCell || isSequence;
buttonAddSequence.Enabled = isNone || isCell || isSequence;
buttonDelete.Enabled = (node != null);
}
private void UpdatePropertyGrid()
{
TreeNode node = treeView.SelectedNode;
if (node == null)
{
propertyGrid.SelectedObject = null;
}
else
{
MenuTreeNode menuNode = (MenuTreeNode)node;
if (menuNode.PageItem != null)
{
propertyGrid.SelectedObject = new PageProxy(menuNode.PageItem);
}
else if (menuNode.CellItem != null)
{
propertyGrid.SelectedObject = new CellProxy(menuNode.CellItem);
}
else
{
propertyGrid.SelectedObject = new SequenceProxy(menuNode.SequenceItem);
}
}
}
private DictItemBase CreateItemsDictionary(object[] items)
{
DictItemBase dictItems = new DictItemBase();
foreach (Component item in items)
{
AddItemsToDictionary(dictItems, item);
}
return dictItems;
}
private void AddItemsToDictionary(DictItemBase dictItems, Component baseItem)
{
// Add item to the dictionary
dictItems.Add(baseItem, baseItem);
// Add pages from a cell
if (baseItem is KryptonWorkspaceCell cell)
{
foreach (Component item in cell.Pages)
{
AddItemsToDictionary(dictItems, item);
}
}
// Add children from a sequence
if (baseItem is KryptonWorkspaceSequence sequence)
{
foreach (Component item in sequence.Children)
{
AddItemsToDictionary(dictItems, item);
}
}
}
private void AddMenuTreeNode(Component item, MenuTreeNode parent)
{
// Create a node to match the item
MenuTreeNode node = new MenuTreeNode(item);
// Add to either root or parent node
if (parent != null)
{
parent.Nodes.Add(node);
}
else
{
treeView.Nodes.Add(node);
}
// Add pages from a cell
if (item is KryptonWorkspaceCell cell)
{
foreach (Component page in cell.Pages)
{
AddMenuTreeNode(page, node);
}
}
// Add children from a sequence
if (item is KryptonWorkspaceSequence sequence)
{
foreach (Component child in sequence.Children)
{
AddMenuTreeNode(child, node);
}
}
}
private void SynchronizeCollections(DictItemBase before,
DictItemBase after,
ITypeDescriptorContext context)
{
// Add all new components (in the 'after' but not the 'before'
foreach (Component item in after.Values)
{
if (!before.ContainsKey(item))
{
context.Container?.Add(item);
}
}
// Delete all old components (in the 'before' but not the 'after'
foreach (Component item in before.Values)
{
if (!after.ContainsKey(item))
{
DestroyInstance(item);
context.Container?.Remove(item);
}
}
IComponentChangeService changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
if (changeService != null)
{
// Mark components as changed when not added or removed
foreach (Component item in after.Values)
{
if (before.ContainsKey(item))
{
changeService.OnComponentChanging(item, null);
changeService.OnComponentChanged(item, null, null, null);
}
}
}
}
#endregion
}
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the KryptonWorkspaceCollectionEditor class.
/// </summary>
public KryptonWorkspaceCollectionEditor()
: base(typeof(KryptonWorkspaceCollection))
{
}
#endregion
#region Protected
/// <summary>
/// Gets access to the owning workspace instance.
/// </summary>
public KryptonWorkspace Workspace
{
get
{
KryptonWorkspaceSequence sequence = (KryptonWorkspaceSequence)Context.Instance;
return sequence.WorkspaceControl;
}
}
#endregion
#region Protected Overrides
/// <summary>
/// Creates a new form to display and edit the current collection.
/// </summary>
/// <returns>A CollectionForm to provide as the user interface for editing the collection.</returns>
protected override CollectionForm CreateCollectionForm()
{
return new KryptonWorkspaceCollectionForm(this);
}
#endregion
}
}
| 42.463235 | 182 | 0.464045 | [
"BSD-3-Clause"
] | dave-w-au/Krypton-NET-5.472 | Source/Krypton Components/ComponentFactory.Krypton.Workspace/Workspace/KryptonWorkspaceCollectionEditor.cs | 80,853 | C# |
using System;
using ChakraCore.NET.API;
namespace ChakraCore.NET.Promise
{
public class PromiseRejectedException : Exception
{
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="T:ChakraCore.NET.Promise.PromiseRejectedException" /> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public PromiseRejectedException(string message)
: base(message) { }
}
}
| 28.055556 | 117 | 0.633663 | [
"MIT"
] | JohnMasen/Chakra.NET | source/ChakraCore.NET.Promise/PromiseRejectedException.cs | 507 | C# |
/*
* WebAPI
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: data
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using SwaggerDateConverter = ARXivarNEXT.Client.Client.SwaggerDateConverter;
namespace ARXivarNEXT.Client.Model
{
/// <summary>
/// UserSecurityStateDTO
/// </summary>
[DataContract]
public partial class UserSecurityStateDTO : IEquatable<UserSecurityStateDTO>
{
/// <summary>
/// Initializes a new instance of the <see cref="UserSecurityStateDTO" /> class.
/// </summary>
/// <param name="id">Identificativo..</param>
/// <param name="state">Nome dello stato..</param>
/// <param name="userId">Identificativo utente..</param>
/// <param name="opt1">Possibilità di modifica del file associato al profilo documentale..</param>
/// <param name="opt2">Possibilità di modifica del profilo documentale..</param>
public UserSecurityStateDTO(int? id = default(int?), string state = default(string), int? userId = default(int?), bool? opt1 = default(bool?), bool? opt2 = default(bool?))
{
this.Id = id;
this.State = state;
this.UserId = userId;
this.Opt1 = opt1;
this.Opt2 = opt2;
}
/// <summary>
/// Identificativo.
/// </summary>
/// <value>Identificativo.</value>
[DataMember(Name="id", EmitDefaultValue=false)]
public int? Id { get; set; }
/// <summary>
/// Nome dello stato.
/// </summary>
/// <value>Nome dello stato.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public string State { get; set; }
/// <summary>
/// Identificativo utente.
/// </summary>
/// <value>Identificativo utente.</value>
[DataMember(Name="userId", EmitDefaultValue=false)]
public int? UserId { get; set; }
/// <summary>
/// Possibilità di modifica del file associato al profilo documentale.
/// </summary>
/// <value>Possibilità di modifica del file associato al profilo documentale.</value>
[DataMember(Name="opt1", EmitDefaultValue=false)]
public bool? Opt1 { get; set; }
/// <summary>
/// Possibilità di modifica del profilo documentale.
/// </summary>
/// <value>Possibilità di modifica del profilo documentale.</value>
[DataMember(Name="opt2", EmitDefaultValue=false)]
public bool? Opt2 { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class UserSecurityStateDTO {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" State: ").Append(State).Append("\n");
sb.Append(" UserId: ").Append(UserId).Append("\n");
sb.Append(" Opt1: ").Append(Opt1).Append("\n");
sb.Append(" Opt2: ").Append(Opt2).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as UserSecurityStateDTO);
}
/// <summary>
/// Returns true if UserSecurityStateDTO instances are equal
/// </summary>
/// <param name="input">Instance of UserSecurityStateDTO to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserSecurityStateDTO input)
{
if (input == null)
return false;
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.State == input.State ||
(this.State != null &&
this.State.Equals(input.State))
) &&
(
this.UserId == input.UserId ||
(this.UserId != null &&
this.UserId.Equals(input.UserId))
) &&
(
this.Opt1 == input.Opt1 ||
(this.Opt1 != null &&
this.Opt1.Equals(input.Opt1))
) &&
(
this.Opt2 == input.Opt2 ||
(this.Opt2 != null &&
this.Opt2.Equals(input.Opt2))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.State != null)
hashCode = hashCode * 59 + this.State.GetHashCode();
if (this.UserId != null)
hashCode = hashCode * 59 + this.UserId.GetHashCode();
if (this.Opt1 != null)
hashCode = hashCode * 59 + this.Opt1.GetHashCode();
if (this.Opt2 != null)
hashCode = hashCode * 59 + this.Opt2.GetHashCode();
return hashCode;
}
}
}
}
| 35.401099 | 179 | 0.525687 | [
"BSD-3-Clause"
] | Artusoft/ARXivarNEXT.Client | src/ARXivarNEXT.Client/Model/UserSecurityStateDTO.cs | 6,449 | C# |
using System;
using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml.Linq;
using System.Xml.XPath;
using System.Text;
using System.Drawing;
namespace RoomScanAPI
{
public class ParseRoomScanXML
{
public ParseRoomScanXML()
{
}
/// <summary>
/// This sample demonstrates reading in a RoomScan LiDAR XML output and parsing it
/// </summary>
public static void Create(string xml)
{
var doc = XDocument.Parse(xml);
var project = doc.XPathSelectElement("/project");
string buildingName = project.XPathSelectElement("name").Value;
Console.WriteLine("Building name " + buildingName);
var floors = doc.XPathSelectElements("/project/floors/floor");
float floorLevel = 0;
foreach (var floor in floors)
{
string floorName = floor.XPathSelectElement("name").Value;
Console.WriteLine("Storey " + floorName + " at level " + floorLevel);
var designs = floor.XPathSelectElements("designs/design");
// usually there will just be one 'design' (floor plan) per floor, but with outbuildings etc there can be more
foreach (var design in designs)
{
var objects = design.XPathSelectElements("objects/object");
var areas = design.XPathSelectElements("areas/area");
var lines = design.XPathSelectElements("lines/line");
float floorHeight = 0.0F;
foreach (var area in areas)
{
if (area.Attribute("type").Value != "room")
{
continue;
}
string roomName = area.XPathSelectElement("name").Value;
string roomIndex = area.Attribute("id").Value;
string roomColourString = area.XPathSelectElement("color").Value;
Color roomColour = System.Drawing.ColorTranslator.FromHtml(roomColourString);
Console.WriteLine("Room name " + roomName + " colour " + roomColourString);
string pointsS = area.XPathSelectElement("points").Value;
List<(float, float)> pointsForArea = new List<(float, float)>();
foreach (string line in pointsS.Split(','))
{
float[] points = Array.ConvertAll(line.Split(',')[0].Split(' '), s => float.Parse(s));
pointsForArea.Add((points[0], -points[1]));
}
string heightS = area.XPathSelectElement("height").Value;
float height = float.Parse(heightS);
if (height > floorHeight) { floorHeight = height; }
Console.WriteLine("Points for floor area calculation: " + string.Join(", ", pointsForArea.ToArray()));
var linesInRoom = lines.Where(l => l.Attribute("area-id").Value == area.Attribute("id").Value && l.XPathSelectElement("type").Value == "simple_wall");
var objectsInRoom = objects.Where(o => o.XPathSelectElement("position/rooms").Value.Split(',')[0] == roomIndex);
foreach (var lineElement in linesInRoom)
{
string line = lineElement.XPathSelectElement("points").Value;
string wallIndex = lineElement.Attribute("id").Value;
float[] points = Array.ConvertAll(line.Split(',')[0].Split(' '), s => float.Parse(s));
float x1 = points[0];
float y1 = -points[1];
float x2 = points[3];
float y2 = -points[4];
float wallLength = (float)Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2));
Console.WriteLine("Wall length {0} from {1},{2} to {3},{4} height {5}", wallLength, x1, y1, x2, y2, height);
var objectsOnWall = objectsInRoom.Where(o => o.XPathSelectElement("position/wall") != null && o.XPathSelectElement("position/wall").Value == wallIndex);
foreach (var o in objectsOnWall)
{
float along = float.Parse(o.XPathSelectElement("position/along").Value);
float[] oPoints = Array.ConvertAll(o.XPathSelectElement("points").Value.Split(' '), s => float.Parse(s));
float[] oSize = Array.ConvertAll(o.XPathSelectElement("size").Value.Split(' '), s => float.Parse(s));
float[] oRotation = Array.ConvertAll(o.XPathSelectElement("rotation").Value.Split(' '), s => float.Parse(s));
// cx,cy is the centre of the opening
float cx = x2 * along + x1 * (1.0F - along);
float cy = y2 * along + y1 * (1.0F - along);
// dx,dy is the centre of the door itself, which may be set back into the opening
float dx = oPoints[0];
float dy = -oPoints[1];
float oWidth = oSize[0];
float oSill = oPoints[2];
float oHeight = oSize[2];
float rotation = (float)(-oRotation[2] * Math.PI / 180.0);
float ox1 = (float)(cx + oWidth * Math.Cos(rotation));
float oy1 = (float)(cy + oWidth * Math.Sin(rotation));
float ox2 = (float)(cx - oWidth * Math.Cos(rotation));
float oy2 = (float)(cy - oWidth * Math.Sin(rotation));
float perpAngle = (float)(Math.Atan2(y2 - y1, x2 - x1));
// auxiliary if true means that this is a door that was added in the adjacent room
// but which connects to this one -- it's a copy of the original to make it easy to
// determine that a gap is needed in the wall in this room without having to go
// searching in adjacent rooms
bool auxiliary = (o.XPathSelectElement("auxiliary").Value == "yes");
string type = o.XPathSelectElement("type").Value;
if (auxiliary || type == "opening")
{
Console.WriteLine("Opening width {0} at {1},{2} to {3},{4} sill height {5} lintel height {6}", oWidth, ox1, oy1, ox2, oy2, oSill, oHeight);
}
else if (type == "door" || type == "double-sliding" || type == "single-sliding" || type == "garage-door" || type == "single-folding" || type == "double-folding")
{
string[] roomList = o.XPathSelectElement("position/rooms").Value.Split(',');
string destination = "exterior";
if (roomList.Count() == 2)
{
string otherRoomIndex = roomList[1];
var otherRoom = areas.Where(a => a.Attribute("id") != null && a.Attribute("id").Value == otherRoomIndex);
if (otherRoom != null && otherRoom.Count() > 0)
{
destination = otherRoom.First().XPathSelectElement("name").Value;
}
}
Console.WriteLine("Door to {7} of type {8} width {0} at {1},{2} to {3},{4} sill height {5} lintel height {6}",
oWidth, ox1, oy1, ox2, oy2, oSill, oHeight, destination, type);
}
else if (type == "window")
{
Console.WriteLine("Window width {0} at {1},{2} to {3},{4} sill height {5} lintel height {6}", oWidth, ox1, oy1, ox2, oy2, oSill, oHeight);
}
}
}
}
floorLevel -= floorHeight;
}
}
}
}
}
| 54.865031 | 193 | 0.459018 | [
"Apache-2.0"
] | lmetric/ParseRoomScanXML | ParseRoomScanXML.cs | 8,945 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Play")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Hewlett-Packard")]
[assembly: AssemblyProduct("Play")]
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c5fde8ef-13be-4d28-99bf-98eb00de4d31")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.135135 | 84 | 0.746279 | [
"MIT"
] | Blecki/RMUD | Play/Properties/AssemblyInfo.cs | 1,414 | C# |
namespace MVsDotNetAMSIClient.Contracts
{
/// <summary>
/// Additional information provided by WindowsDefender
/// Taken from Windows event log
/// </summary>
public class WindowsDefenderDetail : IScanResultDetail
{
public int EventID { get; set; }
public int StatusCode { get; set; }
public string StatusDescription { get; set; }
public string ProductVersion { get; set; }
public string ThreatID { get; set; }
public string ThreatName { get; set; }
public int SeverityID { get; set; }
public string SeverityName { get; set; }
public int CategoryID { get; set; }
public string CategoryName { get; set; }
public string FWLink { get; set; }
public string SecurityIntelligenceVersion { get; set; }
public string EngineVersion { get; set; }
}
}
| 36.416667 | 63 | 0.627002 | [
"MIT"
] | MirekVales/MVsDotNetAMSIClient | src/MVsDotNetAMSIClient.Contracts/WindowsDefenderDetail.cs | 876 | C# |
// <license>
// The MIT License (MIT)
// </license>
// <copyright company="TTRider Technologies, Inc.">
// Copyright (c) 2014-2015 All Rights Reserved
// </copyright>
namespace TTRider.FluidSql
{
public class CreateOrAlterViewStatement : IStatement
{
public Name Name { get; set; }
public IStatement DefinitionStatement { get; set; }
public bool IsTemporary { get; set; }
}
} | 24.352941 | 59 | 0.654589 | [
"MIT"
] | oshpak92/fluid-sql | C#/TTRider.FluidSQL/Statements/CreateOrAlterViewStatement.cs | 416 | C# |
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef
using Beef.Entities;
using Newtonsoft.Json;
namespace Beef.RefData.Model
{
/// <summary>
/// Represents the <b>model</b> version of the <see cref="RefData.ReferenceDataBase"/> with an <see cref="System.Int64"/> <see cref="Id"/>.
/// </summary>
public abstract class ReferenceDataBaseInt64 : ReferenceDataBase, IInt64Identifier
{
/// <summary>
/// Gets or sets the identifier.
/// </summary>
[JsonProperty("id", Order = 0)]
public long Id { get; set; }
}
} | 32.421053 | 143 | 0.63474 | [
"MIT"
] | Avanade/Beef | src/Beef.Abstractions/RefData/Model/ReferenceDataBaseInt64.cs | 618 | C# |
using System;
using NUnit.Framework;
namespace SJP.Schematic.Core.Tests;
[TestFixture]
internal static class IdentifierComparerTests
{
[Test]
public static void Ctor_GivenInvalidStringComparison_ThrowsArgumentException()
{
const StringComparison badStringComparison = (StringComparison)55;
Assert.That(() => new IdentifierComparer(badStringComparison), Throws.ArgumentException);
}
[Test]
public static void Ctor_GivenNullComparer_ThrowsArgumentNullException()
{
Assert.That(() => new IdentifierComparer(null), Throws.ArgumentNullException);
}
[Test]
public static void Equals_GivenEqualValues_ReturnsTrue()
{
const string name = "test";
var comparer = new IdentifierComparer();
var identifier = new Identifier(name);
var otherIdentifier = new Identifier(name);
Assert.Multiple(() =>
{
Assert.That(comparer.Equals(null, null), Is.True);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
});
}
[Test]
public static void Equals_GivenDifferentValues_ReturnsFalse()
{
const string name = "test";
const string otherName = "def";
var comparer = new IdentifierComparer();
var identifier = new Identifier(name);
var otherIdentifier = new Identifier(otherName);
Assert.Multiple(() =>
{
Assert.That(comparer.Equals(identifier, null), Is.False);
Assert.That(comparer.Equals(null, identifier), Is.False);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
});
}
[Test]
public static void GetHashCode_GivenNullArgument_ReturnsZero()
{
var comparer = new IdentifierComparer();
Assert.That(comparer.GetHashCode(null), Is.Zero);
}
[Test]
public static void GetHashCode_GivenNonNullArgument_ReturnsNonZeroValue()
{
var comparer = new IdentifierComparer();
Assert.That(comparer.GetHashCode("test"), Is.Not.Zero);
}
[Test]
[SetCulture("en-US")]
public static void Equals_GivenCurrentCultureWithDifferentCasesOnly_ReturnsFalse()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("TEST");
var comparer = IdentifierComparer.CurrentCulture;
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
[SetCulture("en-US")]
public static void Equals_GivenCurrentCultureIgnoreCaseWithDifferentCasesOnly_ReturnsTrue()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("TEST");
var comparer = IdentifierComparer.CurrentCultureIgnoreCase;
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_GivenOrdinalWithDifferentCasesOnly_ReturnsFalse()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("TEST");
var comparer = IdentifierComparer.Ordinal;
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenOrdinalIgnoreCaseWithDifferentCasesOnly_ReturnsTrue()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("TEST");
var comparer = IdentifierComparer.OrdinalIgnoreCase;
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_WhenDefaultSchemaSetAndGivenIdentifierWithNullSchema_ReturnsTrue()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultSchema: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_WhenDefaultSchemaSetAndGivenIdentifiersWithDifferentSchema_ReturnsFalse()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("other", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultSchema: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_WhenDefaultSchemaSetAndGivenIdentifiersWithDifferentSchemasSet_ReturnsFalse()
{
var identifier = new Identifier("other", "test");
var otherIdentifier = new Identifier("name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultSchema: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenIdentifiersWithDifferentSchemasSetAndExplicitComparer_ReturnsFalse()
{
var identifier = new Identifier("other", "test");
var otherIdentifier = new Identifier("name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenIdentifiersWithSameSchemasSetAndExplicitComparer_ReturnsTrue()
{
var identifier = new Identifier("name", "test");
var otherIdentifier = new Identifier("name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_WhenDefaultDatabaseSetAndGivenIdentifierWithNullDatabase_ReturnsTrue()
{
var identifier = new Identifier("name", "test");
var otherIdentifier = new Identifier("name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultDatabase: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_WhenDefaultDatabaseSetAndGivenIdentifiersWithDifferentDatabase_ReturnsFalse()
{
var identifier = new Identifier("name", "test");
var otherIdentifier = new Identifier("other", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultDatabase: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_WhenDefaultDatabaseSetAndGivenIdentifiersWithDifferentDatabasesSet_ReturnsFalse()
{
var identifier = new Identifier("other", "name", "test");
var otherIdentifier = new Identifier("name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultDatabase: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenIdentifiersWithDifferentDatabasesSetAndExplicitComparer_ReturnsFalse()
{
var identifier = new Identifier("other", "name", "test");
var otherIdentifier = new Identifier("name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenIdentifiersWithSameDatabasesSetAndExplicitComparer_ReturnsTrue()
{
var identifier = new Identifier("name", "name", "test");
var otherIdentifier = new Identifier("name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_WhenServerSetAndGivenIdentifierWithNullServer_ReturnsTrue()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultServer: "name", defaultDatabase: "name", defaultSchema: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Equals_WhenServerSetAndGivenIdentifiersWithDifferentServer_ReturnsFalse()
{
var identifier = new Identifier("test");
var otherIdentifier = new Identifier("other", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultServer: "name", defaultDatabase: "name", defaultSchema: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_WhenServerSetAndGivenIdentifiersWithDifferentServersSet_ReturnsFalse()
{
var identifier = new Identifier("other", "name", "name", "test");
var otherIdentifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture, defaultServer: "name", defaultDatabase: "name", defaultSchema: "name");
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenIdentifiersWithDifferentServersSetAndExplicitComparer_ReturnsFalse()
{
var identifier = new Identifier("other", "name", "name", "test");
var otherIdentifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.False);
}
[Test]
public static void Equals_GivenIdentifiersWithSameServersSetAndExplicitComparer_ReturnsTrue()
{
var identifier = new Identifier("name", "name", "name", "test");
var otherIdentifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
Assert.That(comparer.Equals(identifier, otherIdentifier), Is.True);
}
[Test]
public static void Compare_GivenSameIdentifier_ReturnsZero()
{
var identifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(identifier, identifier);
Assert.That(compareResult, Is.Zero);
}
[Test]
public static void Compare_GivenTwoNullIdentifiers_ReturnsZero()
{
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(null, null);
Assert.That(compareResult, Is.Zero);
}
[Test]
public static void Compare_GivenLeftNullIdentifier_ReturnsNonZero()
{
var identifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(null, identifier);
Assert.That(compareResult, Is.Not.Zero);
}
[Test]
public static void Compare_GivenRightNullIdentifier_ReturnsNonZero()
{
var identifier = new Identifier("name", "name", "name", "test");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(identifier, null);
Assert.That(compareResult, Is.Not.Zero);
}
[Test]
public static void Compare_GivenDifferentServer_ReturnsNonZero()
{
var identifier = new Identifier("name", "name", "name", "name");
var otherIdentifier = new Identifier("z", "name", "name", "name");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(identifier, otherIdentifier);
Assert.That(compareResult, Is.Not.Zero);
}
[Test]
public static void Compare_GivenDifferentDatabase_ReturnsNonZero()
{
var identifier = new Identifier("name", "name", "name", "name");
var otherIdentifier = new Identifier("name", "z", "name", "name");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(identifier, otherIdentifier);
Assert.That(compareResult, Is.Not.Zero);
}
[Test]
public static void Compare_GivenDifferentSchema_ReturnsNonZero()
{
var identifier = new Identifier("name", "name", "name", "name");
var otherIdentifier = new Identifier("name", "name", "z", "name");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(identifier, otherIdentifier);
Assert.That(compareResult, Is.Not.Zero);
}
[Test]
public static void Compare_GivenDifferentLocalName_ReturnsNonZero()
{
var identifier = new Identifier("name", "name", "name", "name");
var otherIdentifier = new Identifier("name", "name", "name", "z");
var comparer = new IdentifierComparer(StringComparison.CurrentCulture);
var compareResult = comparer.Compare(identifier, otherIdentifier);
Assert.That(compareResult, Is.Not.Zero);
}
} | 38.667614 | 151 | 0.674014 | [
"MIT"
] | sjp/SJP.Schema | src/SJP.Schematic.Core.Tests/IdentifierComparerTests.cs | 13,262 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Plainion.Wiki.AST;
namespace Plainion.Wiki.Auditing
{
/// <summary/>
public class AbstractAction : IAuditingAction
{
/// <summary/>
protected AbstractAction( PageName pageName )
{
if ( pageName == null )
{
throw new ArgumentNullException( "pageName" );
}
RelatedPage = pageName;
}
/// <summary/>
public PageName RelatedPage
{
get;
private set;
}
}
}
| 20.774194 | 63 | 0.507764 | [
"BSD-3-Clause"
] | plainionist/Plainion.Notes | src/Plainion.Wiki/Auditing/AbstractAction.cs | 646 | C# |
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MusicShop.Domain;
using MusicShop.Repository;
using System;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
namespace MusicShop.UI.Controllers
{
[Authorize]
public class CustomersController : Controller
{
private readonly ICustomerRepository _customerRepository;
//public string SessionKeyName { get; private set; }
public CustomersController(ICustomerRepository customerRepository)
{
_customerRepository = customerRepository;
}
/// <summary>
/// Directs to Customer index page with model
/// </summary>
/// <param name="SearchString"></param>
/// <param name="isSuccess"></param>
/// <returns></returns>
[Authorize]
public async Task<IActionResult> Index(string SearchString, bool isSuccess = false)
{
ViewBag.isSuccess = isSuccess;
ViewBag.UserName = User.FindFirstValue(ClaimTypes.Name);
ViewData["Searching"] = ""; // Assume not searching at the begining.
var customers = await _customerRepository.GetAllAsync();
// Search Customers
if (!String.IsNullOrEmpty(SearchString))
{
customers = customers.Where(p => p.LastName.ToUpper().Contains(SearchString.ToUpper())
|| p.FirstName.ToUpper().Contains(SearchString.ToUpper()));
ViewData["Searching"] = " show";
}
return View(customers);
}
/// <summary>
/// Serves Create View
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[HttpGet]
public IActionResult Create()
{
return View();
}
/// <summary>
/// Creates a Customer using the posted data.
/// </summary>
/// <param name="rePassword"></param>
/// <param name="customer"></param>
/// <param name="customerAddress"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(string rePassword, [Bind("FirstName,LastName,Email,PhoneNo,Password")] Customer customer,
[Bind("Street,City,State,Zip")] CustomerAddress customerAddress
)
{
if (ModelState.IsValid)
{
var checkCustomer = await _customerRepository.FindSingleAsync(i => i.Email == customer.Email);
if (checkCustomer == null)
{
if (customer.Password != rePassword)
{
ModelState.AddModelError("Password", "Password's did't match.");
return View("Create", customer);
}
var cusAdd = new CustomerAddress
{
Street = customerAddress.Street,
City = customerAddress.City,
State = customerAddress.State,
Zip = customerAddress.Zip
};
var cust = new Customer
{
FirstName = customer.FirstName,
LastName = customer.LastName,
Email = customer.Email,
PhoneNo = customer.PhoneNo,
CustomerAddress = cusAdd,
Password = customer.Password,
UserTypeId = 2
};
await _customerRepository.AddAsync(cust);
ViewBag.IsSuccess = true;
ModelState.Clear();
return View();
}
else
{
ModelState.AddModelError("Email", "Customer with same email address already exits.");
return View(customer);
}
}
return View(customer);
}
/// <summary>
/// Displays the details about user
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<IActionResult> Details(int? id)
{
if (id == null)
{
return NotFound();
}
//var customer = await _Customers
// .FirstOrDefaultAsync(m => m.Id == id);
var customer = await _customerRepository.FindSingleAsync(i => i.Id == id);
if (customer == null)
{
return NotFound();
}
return View(customer);
}
/// <summary>
/// Get view for Edit
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Authorize]
public async Task<IActionResult> Edit(int? id)
{
if (id == null)
{
return NotFound();
}
var customer = await _customerRepository.FindCustomerById(id);
//var cust = customer.Include(i=>i.CustomerAddress).
if (customer == null)
{
return NotFound();
}
return View(customer);
}
// POST: Customers/Edit/5
// To protect from overposting attacks, enable the specific properties you want to bind to, for
// more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
/// <summary>
/// Uses the posted data to edit customer details.
/// </summary>
/// <param name="id"></param>
/// <param name="customer"></param>
/// <param name="customerAddress"></param>
/// <returns></returns>
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,Email,PhoneNo")] Customer customer,
[Bind("Street,City,State,Zip")] CustomerAddress customerAddress)
{
if (id != customer.Id)
{
return NotFound();
}
if (ModelState.IsValid)
{
try
{
customer.CustomerAddress = customerAddress;
await _customerRepository.UpdateAsync(customer);
}
catch (Exception)
{
}
return RedirectToAction(nameof(Index));
}
return View(customer);
}
/// <summary>
/// Deletes the customer using the id passed in.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Authorize]
public async Task<IActionResult> Delete(int? id)
{
if (id == null)
{
return NotFound();
}
var customer = await _customerRepository.FindSingleAsync(i => i.Id == id);
if (customer == null)
{
return NotFound();
}
return View(customer);
}
/// <summary>
/// Confirms with user about delete before actually deleting it from
/// database.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Authorize]
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
await _customerRepository.DeleteAsync(id);
return RedirectToAction(nameof(Index));
}
}
}
| 32.45 | 137 | 0.498331 | [
"MIT"
] | 042020-dotnet-uta/sulavAryal-repo1 | Project2/MusicShop.UI/Controllers/CustomersController.cs | 7,790 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebAddressBookTests
{
public class ContactData
{
private string firstname;
private string middlename = "";
private string lastname = "";
//конструктор
public ContactData(string firstname)
{
this.firstname = firstname;
}
//свойстви знаечний
public string Firstname
{
get
{
return firstname;
}
set
{
firstname = value;
}
}
public string Middlename
{
get
{
return middlename;
}
set
{
middlename = value;
}
}
public string Lastname
{
get
{
return lastname;
}
set
{
lastname = value;
}
}
}
}
| 18.2 | 44 | 0.421245 | [
"Apache-2.0"
] | Nasts/charp_training_pam | addressbook-web-tests/addressbook-web-tests/model/ContactData.cs | 1,121 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace GISShare.Controls.Plugin.WinForm.WFNew
{
public class MenuButtonItemP : IPlugin, IPluginInfo, IEventChain, IPlugin2, ISetEntityObject, IBaseItemP_, ILabelItemP, IImageLabelItemP, IImageBoxItemP, IBaseButtonItemP, IDropDownButtonItemP, ISplitButtonItemP, IButtonItemP, IMenuButtonItemP, ISubItem
{
#region 私有属性
private object m_EntityObject;
#endregion
#region 受保护的属性
protected string _Name = "GISShare.Controls.Plugin.WinForm.WFNew.MenuButtonItemP";
//
protected string _Text = "GISShare.Controls.Plugin.WinForm.WFNew.MenuButtonItemP";
protected bool _Visible = true;
protected bool _Enabled = true;
protected System.Windows.Forms.Padding _Padding = new System.Windows.Forms.Padding(0);
protected System.Drawing.Font _Font = new System.Drawing.Font("宋体", 9f);
protected System.Drawing.Color _ForeColor = System.Drawing.SystemColors.ControlText;
protected System.Drawing.Size _Size = new System.Drawing.Size(21, 21);
protected bool _Checked = false;
protected bool _LockHeight = false;
protected bool _LockWith = false;
protected string _Category = "默认";
protected System.Drawing.Size _MinimumSize = new System.Drawing.Size(10, 10);
protected bool _UsingViewOverflow = true;
//
protected System.Drawing.ContentAlignment _TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
protected bool _AutoPlanTextRectangle = true;
protected int _ITSpace = 1;
protected GISShare.Controls.WinForm.WFNew.DisplayStyle _eDisplayStyle = Controls.WinForm.WFNew.DisplayStyle.eImageAndText;
//
protected System.Drawing.Image _Image = null;
protected System.Drawing.ContentAlignment _ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
protected GISShare.Controls.WinForm.WFNew.ImageSizeStyle _eImageSizeStyle = Controls.WinForm.WFNew.ImageSizeStyle.eDefault;
protected System.Drawing.Size _ImageSize = new System.Drawing.Size(30, 30);
//
protected bool _ShowNomalState = false;
protected int _LeftTopRadius = 3;
protected int _RightTopRadius = 3;
protected int _LeftBottomRadius = 3;
protected int _RightBottomRadius = 3;
//
protected int _DropDownDistance = 23;
protected GISShare.Controls.WinForm.WFNew.ArrowStyle _eArrowStyle = GISShare.Controls.WinForm.WFNew.ArrowStyle.eToRight;
protected GISShare.Controls.WinForm.WFNew.ArrowDock _eArrowDock = GISShare.Controls.WinForm.WFNew.ArrowDock.eRight;
protected GISShare.Controls.WinForm.WFNew.ContextPopupStyle _eContextPopupStyle = GISShare.Controls.WinForm.WFNew.ContextPopupStyle.eNormal;
protected System.Drawing.Size _ArrowSize = new System.Drawing.Size(4, 6);
protected int _PopupSpace = 0;
//
protected int _ItemCount = 0;
//
protected bool _ShowNomalSplitLine = true;
//
protected GISShare.Controls.WinForm.WFNew.ButtonStyle _eButtonStyle = Controls.WinForm.WFNew.ButtonStyle.eButton;
#endregion
#region IPlugin
/// <summary>
/// 唯一编码(必须设置)
/// </summary>
public string Name
{
get
{
return _Name;
}
}
/// <summary>
/// 接口所在的分类(用于标识自身反射对象的分类)
/// </summary>
public int CategoryIndex
{
get
{
return (int)CategoryIndex_1_Style.eMenuButtonItem;
}
}
#endregion
#region IPluginInfo
public virtual string GetDescribe()
{
return this.Text;
}
#endregion
#region IInteraction
public virtual object CommandOperation(int iOperationStyle, params object[] objs)
{
return null;
}
#endregion
#region IEventChain
/// <summary>
/// 事件触发
/// </summary>
/// <param name="iEventStyle">事件类型</param>
/// <param name="e">事件参数</param>
public virtual void OnTriggerEvent(int iEventStyle, EventArgs e) { }
#endregion
#region IPlugin2
public object EntityObject
{
get { return m_EntityObject; }
}
public virtual void OnCreate(object hook) { }
#endregion
#region ISetEntityObject
void ISetEntityObject.SetEntityObject(object obj)
{
this.m_EntityObject = obj;
}
#endregion
#region IBaseItemP_
public string Text
{
get { return _Text; }
}
public bool Visible
{
get { return _Visible; }
}
public bool Enabled
{
get { return _Enabled; }
}
public System.Windows.Forms.Padding Padding
{
get { return _Padding; }
}
public System.Drawing.Font Font
{
get { return _Font; }
}
public System.Drawing.Color ForeColor
{
get { return _ForeColor; }
}
public System.Drawing.Size Size
{
get { return _Size; }
}
public bool Checked
{
get { return _Checked; }
}
public bool LockHeight
{
get { return _LockHeight; }
}
public bool LockWith
{
get { return _LockWith; }
}
public string Category
{
get { return _Category; }
}
public System.Drawing.Size MinimumSize
{
get { return _MinimumSize; }
}
public bool UsingViewOverflow
{
get { return _UsingViewOverflow; }
}
#endregion
#region ILabelItemP
public System.Drawing.ContentAlignment TextAlign
{
get { return _TextAlign; }
}
#endregion
#region IImageLabelItemP
public bool AutoPlanTextRectangle
{
get { return _AutoPlanTextRectangle; }
}
public int ITSpace
{
get { return _ITSpace; }
}
public GISShare.Controls.WinForm.WFNew.DisplayStyle eDisplayStyle
{
get { return _eDisplayStyle; }
}
#endregion
#region IImageBoxItemP
public System.Drawing.Image Image
{
get { return _Image; }
}
public System.Drawing.ContentAlignment ImageAlign
{
get { return _ImageAlign; }
}
public GISShare.Controls.WinForm.WFNew.ImageSizeStyle eImageSizeStyle
{
get { return _eImageSizeStyle; }
}
public System.Drawing.Size ImageSize
{
get { return _ImageSize; }
}
#endregion
#region IBaseButtonItemP
public bool ShowNomalState
{
get { return _ShowNomalState; }
}
public int LeftTopRadius
{
get { return _LeftTopRadius; }
}
public int RightTopRadius
{
get { return _RightTopRadius; }
}
public int LeftBottomRadius
{
get { return _LeftBottomRadius; }
}
public int RightBottomRadius
{
get { return _RightBottomRadius; }
}
#endregion
#region IDropDownButtonItemP
public int DropDownDistance
{
get { return _DropDownDistance; }
}
public GISShare.Controls.WinForm.WFNew.ArrowStyle eArrowStyle
{
get { return _eArrowStyle; }
}
public GISShare.Controls.WinForm.WFNew.ArrowDock eArrowDock
{
get { return _eArrowDock; }
}
public GISShare.Controls.WinForm.WFNew.ContextPopupStyle eContextPopupStyle
{
get { return _eContextPopupStyle; }
}
public System.Drawing.Size ArrowSize
{
get { return _ArrowSize; }
}
public int PopupSpace
{
get { return _PopupSpace; }
}
#endregion
#region ISplitButtonItemP
public bool ShowNomalSplitLine
{
get { return _ShowNomalSplitLine; }
}
#endregion
#region IButtonItemP
public GISShare.Controls.WinForm.WFNew.ButtonStyle eButtonStyle
{
get { return _eButtonStyle; }
}
#endregion
#region ISubItem
/// <summary>
/// 携带的 Item 数量
/// </summary>
public int ItemCount
{
get
{
return _ItemCount;
}
}
/// <summary>
/// 访问快捷菜单中每个Item的方法
/// </summary>
/// <param name="iIndex"></param>
/// <param name="pItemDef"></param>
public virtual void GetItemInfo(int iIndex, IItemDef pItemDef) { }
#endregion
//
//
//
public static GISShare.Controls.WinForm.WFNew.MenuButtonItem CreateMenuButtonItem(IMenuButtonItemP pBaseItemP)
{
GISShare.Controls.WinForm.WFNew.MenuButtonItem baseItem = new Controls.WinForm.WFNew.MenuButtonItem();
//IPlugin
baseItem.Name = pBaseItemP.Name;
//ISetEntityObject
GISShare.Controls.Plugin.ISetEntityObject pSetEntityObject = pBaseItemP as GISShare.Controls.Plugin.ISetEntityObject;
if (pSetEntityObject != null) pSetEntityObject.SetEntityObject(baseItem);
//IBaseItemP_
baseItem.Checked = pBaseItemP.Checked;
baseItem.Enabled = pBaseItemP.Enabled;
baseItem.Font = pBaseItemP.Font;
baseItem.ForeColor = pBaseItemP.ForeColor;
baseItem.LockHeight = pBaseItemP.LockHeight;
baseItem.LockWith = pBaseItemP.LockWith;
baseItem.Padding = pBaseItemP.Padding;
baseItem.Size = pBaseItemP.Size;
baseItem.Text = pBaseItemP.Text;
baseItem.Visible = pBaseItemP.Visible;
baseItem.Category = pBaseItemP.Category;
baseItem.MinimumSize = pBaseItemP.MinimumSize;
baseItem.UsingViewOverflow = pBaseItemP.UsingViewOverflow;
//ILabelItemP
baseItem.TextAlign = pBaseItemP.TextAlign;
//IImageBoxItemP
baseItem.eImageSizeStyle = pBaseItemP.eImageSizeStyle;
baseItem.Image = pBaseItemP.Image;
baseItem.ImageAlign = pBaseItemP.ImageAlign;
baseItem.ImageSize = pBaseItemP.ImageSize;
//IImageLabelItemP
baseItem.AutoPlanTextRectangle = pBaseItemP.AutoPlanTextRectangle;
baseItem.ITSpace = pBaseItemP.ITSpace;
baseItem.eDisplayStyle = pBaseItemP.eDisplayStyle;
//IBaseButtonItemP
baseItem.LeftBottomRadius = pBaseItemP.LeftBottomRadius;
baseItem.LeftTopRadius = pBaseItemP.LeftTopRadius;
baseItem.RightBottomRadius = pBaseItemP.RightBottomRadius;
baseItem.RightTopRadius = pBaseItemP.RightTopRadius;
baseItem.ShowNomalState = pBaseItemP.ShowNomalState;
//IDropDownButtonItemP
baseItem.DropDownDistance = pBaseItemP.DropDownDistance;
baseItem.eArrowStyle = pBaseItemP.eArrowStyle;
baseItem.eArrowDock = pBaseItemP.eArrowDock;
baseItem.eContextPopupStyle = pBaseItemP.eContextPopupStyle;
baseItem.ArrowSize = pBaseItemP.ArrowSize;
baseItem.PopupSpace = pBaseItemP.PopupSpace;
//ISplitButtonItemP
baseItem.ShowNomalSplitLine = pBaseItemP.ShowNomalSplitLine;
//IButtonItemP
//baseItem.eButtonStyle = pBaseItemP.eButtonStyle;
return baseItem;
}
}
}
| 30.83376 | 257 | 0.593895 | [
"MIT"
] | gisshare2015/GISShare.Controls.WinForm | GISShare.Controls.Plugin.WinForm/WFNew/Button/MenuButtonItemP.cs | 12,208 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace ContactsCrudMvc.Web.Models
{
public class Personcs
{
public int Id { get; set; }
[Display(Name = "Nome")]
public string Name { get; set; }
[Display(Name = "Telefone")]
public string Phone { get; set; }
[Display(Name = "E-mail")]
public string Email { get; set; }
}
} | 21.772727 | 44 | 0.617954 | [
"MIT"
] | lnleonardov/ContatosAlfaMidia | ContactsCrudMvc.Web/Models/Personcs.cs | 481 | C# |
/*
* Copyright 2021 ALE International
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace o2g.Types.CallCenterRsiNS
{
/// <summary>
/// <c>DataCollected</c> represents a collection of tones.
/// DTMF tones are generated by parties on a call by pressing the dialpad digits 0 through 9 and * and # during the call.
/// </summary>
public class DataCollected
{
/// <summary>
/// <c>CollectionCause</c> represents the reason why the digits collection ended.
/// </summary>
public enum CollectionCause
{
/// <summary>
/// A specific tone specified in the retrieval criteria is received.
/// </summary>
[EnumMember(Value = "FLUSCHAR_RECEIVED")]
FlushcharReceived,
/// <summary>
/// The number of tones specified in the retrieval criteria is received.
/// </summary>
[EnumMember(Value = "CHAR_COUNT_REACHED")]
CharCountReached,
/// <summary>
/// The timeout specified in the retrieval criteria has elapsed.
/// </summary>
[EnumMember(Value = "TIMEOUT")]
Timeout,
/// <summary>
/// An error occurs.
/// </summary>
[EnumMember(Value = "SF_TERMINATED")]
SfTerminated
}
/// <summary>
/// The collection digit identifier.
/// </summary>
/// <value>
/// A <see langword="string"/> that represents the digits collection identifier.
/// </value>
public string CollCrid { get; init; }
/// <summary>
/// Return the collected digits.
/// </summary>
/// <value>
/// A <see langword="string"/> that represents the collected digits".
/// </value>
public string Digits { get; init; }
/// <summary>
/// Return the cause of the digit collection termination.
/// </summary>
/// <value>
/// A <see cref="CollectionCause"/> value that represents the reason of the digit collection termination.
/// </value>
public CollectionCause Cause { get; init; }
}
}
| 37.318681 | 125 | 0.627797 | [
"MIT"
] | ALE-OPENNESS/CSharp-SDK | Types/CallCenterRsi/DataCollected.cs | 3,398 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movement : MonoBehaviour
{
// Start is called before the first frame update
public CharacterController controller;
public float speed = 9f;
public float speedslow = 4f;
public float turnTime = 0.1f;
public float turnSmoothVelocity;
public Transform cam;
public float gravity = -9.8f;
public float jumpHeight = 3f;
public float groundDistance = 0.4f;
public LayerMask groundMask;
public bool isGrounded;
public bool walk = false;
public bool running = false;
public Transform groundCheck;
Vector3 velocity;
public bool jump = false;
void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
// Update is called once per frame
void Update()
{
float horizontal = Input.GetAxisRaw("Horizontal");
float vertical = Input.GetAxisRaw("Vertical");
Vector3 direction = new Vector3(horizontal, 0f, vertical).normalized;
if (Input.GetKey(KeyCode.LeftShift))
{
walk = true;
}
else walk = false;
{
float targetAngle = /*Mathf.Atan2(direction.x, direction.z) * Mathf.Rad2Deg+*/cam.eulerAngles.y;
//float angle = Mathf.SmoothDampAngle(transform.eulerAngles.y, targetAngle, ref turnSmoothVelocity, turnTime);
transform.rotation = Quaternion.Euler(0f, targetAngle, 0f);
Vector3 movedir = Quaternion.Euler(0f, targetAngle, 0f) * direction;
if (walk) controller.Move(movedir * speedslow * Time.deltaTime);
else controller.Move(movedir * speed * Time.deltaTime);
if (movedir.magnitude > 0)
{
running = true;
}
else running = false;
}
isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
if (isGrounded && velocity.y < 0)
{
velocity.y = -2f;
}
if (Input.GetButtonDown("Jump") && isGrounded)
{
velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity);
jump = true;
}
velocity.y += gravity * Time.deltaTime;
controller.Move(velocity * Time.deltaTime);
}
}
| 29.987013 | 122 | 0.610654 | [
"MIT"
] | AbhishekPardhi/Hurricane-Advanced-game-dev-prototype | Assets/Scripts/Player/movement.cs | 2,309 | C# |
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
// </auto-generated>
// ----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser")]
namespace CppSharp
{
namespace Parser
{
namespace AST
{
public enum TypeKind
{
Tag = 0,
Array = 1,
Function = 2,
Pointer = 3,
MemberPointer = 4,
Typedef = 5,
Attributed = 6,
Decayed = 7,
TemplateSpecialization = 8,
DependentTemplateSpecialization = 9,
TemplateParameter = 10,
TemplateParameterSubstitution = 11,
InjectedClassName = 12,
DependentName = 13,
PackExpansion = 14,
Builtin = 15,
UnaryTransform = 16,
Vector = 17
}
public enum DeclarationKind
{
DeclarationContext = 0,
Typedef = 1,
TypeAlias = 2,
Parameter = 3,
Function = 4,
Method = 5,
Enumeration = 6,
EnumerationItem = 7,
Variable = 8,
Field = 9,
AccessSpecifier = 10,
Class = 11,
Template = 12,
TypeAliasTemplate = 13,
ClassTemplate = 14,
ClassTemplateSpecialization = 15,
ClassTemplatePartialSpecialization = 16,
FunctionTemplate = 17,
Namespace = 18,
PreprocessedEntity = 19,
MacroDefinition = 20,
MacroExpansion = 21,
TranslationUnit = 22,
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
NonTypeTemplateParm = 26,
VarTemplate = 27,
VarTemplateSpecialization = 28,
VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
{
Private = 0,
Protected = 1,
Public = 2
}
public enum MacroLocation
{
Unknown = 0,
ClassHead = 1,
ClassBody = 2,
FunctionHead = 3,
FunctionParameters = 4,
FunctionBody = 5
}
public enum RawCommentKind
{
Invalid = 0,
OrdinaryBCPL = 1,
OrdinaryC = 2,
BCPLSlash = 3,
BCPLExcl = 4,
JavaDoc = 5,
Qt = 6,
Merged = 7
}
public enum CommentKind
{
FullComment = 0,
BlockContentComment = 1,
BlockCommandComment = 2,
ParamCommandComment = 3,
TParamCommandComment = 4,
VerbatimBlockComment = 5,
VerbatimLineComment = 6,
ParagraphComment = 7,
HTMLTagComment = 8,
HTMLStartTagComment = 9,
HTMLEndTagComment = 10,
TextComment = 11,
InlineContentComment = 12,
InlineCommandComment = 13,
VerbatimBlockLineComment = 14
}
public enum FriendKind
{
None = 0,
Declared = 1,
Undeclared = 2
}
public enum CXXOperatorKind
{
None = 0,
New = 1,
Delete = 2,
ArrayNew = 3,
ArrayDelete = 4,
Plus = 5,
Minus = 6,
Star = 7,
Slash = 8,
Percent = 9,
Caret = 10,
Amp = 11,
Pipe = 12,
Tilde = 13,
Exclaim = 14,
Equal = 15,
Less = 16,
Greater = 17,
PlusEqual = 18,
MinusEqual = 19,
StarEqual = 20,
SlashEqual = 21,
PercentEqual = 22,
CaretEqual = 23,
AmpEqual = 24,
PipeEqual = 25,
LessLess = 26,
GreaterGreater = 27,
LessLessEqual = 28,
GreaterGreaterEqual = 29,
EqualEqual = 30,
ExclaimEqual = 31,
LessEqual = 32,
GreaterEqual = 33,
AmpAmp = 34,
PipePipe = 35,
PlusPlus = 36,
MinusMinus = 37,
Comma = 38,
ArrowStar = 39,
Arrow = 40,
Call = 41,
Subscript = 42,
Conditional = 43,
Coawait = 44
}
public enum CallingConvention
{
Default = 0,
C = 1,
StdCall = 2,
ThisCall = 3,
FastCall = 4,
Unknown = 5
}
public enum StatementClass
{
Any = 0,
BinaryOperator = 1,
CallExprClass = 2,
DeclRefExprClass = 3,
CXXConstructExprClass = 4,
CXXOperatorCallExpr = 5,
ImplicitCastExpr = 6,
ExplicitCastExpr = 7
}
public enum TemplateSpecializationKind
{
Undeclared = 0,
ImplicitInstantiation = 1,
ExplicitSpecialization = 2,
ExplicitInstantiationDeclaration = 3,
ExplicitInstantiationDefinition = 4
}
public enum CXXMethodKind
{
Normal = 0,
Constructor = 1,
Destructor = 2,
Conversion = 3,
Operator = 4,
UsingDirective = 5
}
public enum RefQualifierKind
{
None = 0,
LValue = 1,
RValue = 2
}
public enum CppAbi
{
Itanium = 0,
Microsoft = 1,
ARM = 2,
iOS = 3,
iOS64 = 4
}
public enum VTableComponentKind
{
VCallOffset = 0,
VBaseOffset = 1,
OffsetToTop = 2,
RTTI = 3,
FunctionPointer = 4,
CompleteDtorPointer = 5,
DeletingDtorPointer = 6,
UnusedFunctionPointer = 7
}
public enum PrimitiveType
{
Null = 0,
Void = 1,
Bool = 2,
WideChar = 3,
Char = 4,
SChar = 5,
UChar = 6,
Char16 = 7,
Char32 = 8,
Short = 9,
UShort = 10,
Int = 11,
UInt = 12,
Long = 13,
ULong = 14,
LongLong = 15,
ULongLong = 16,
Int128 = 17,
UInt128 = 18,
Half = 19,
Float = 20,
Double = 21,
LongDouble = 22,
Float128 = 23,
IntPtr = 24
}
public enum ExceptionSpecType
{
None = 0,
DynamicNone = 1,
Dynamic = 2,
MSAny = 3,
BasicNoexcept = 4,
ComputedNoexcept = 5,
Unevaluated = 6,
Uninstantiated = 7,
Unparsed = 8
}
public enum ArchType
{
UnknownArch = 0,
X86 = 1,
X86_64 = 2
}
public unsafe partial class Type : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Type@AST@CppParser@CppSharp@@QEAA@W4TypeKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.TypeKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Type@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Type> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Type>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.Type __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Type(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Type __CreateInstance(global::CppSharp.Parser.AST.Type.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Type(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Type.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Type.__Internal));
global::CppSharp.Parser.AST.Type.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Type(global::CppSharp.Parser.AST.Type.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Type(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Type(global::CppSharp.Parser.AST.TypeKind kind)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Type.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public Type(global::CppSharp.Parser.AST.Type _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Type.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Type __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public static implicit operator global::CppSharp.Parser.AST.Type(global::CppSharp.Parser.AST.TypeKind kind)
{
return new global::CppSharp.Parser.AST.Type(kind);
}
public global::CppSharp.Parser.AST.TypeKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.Type.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.Type.__Internal*) __Instance)->kind = value;
}
}
public bool IsDependent
{
get
{
return ((global::CppSharp.Parser.AST.Type.__Internal*) __Instance)->isDependent != 0;
}
set
{
((global::CppSharp.Parser.AST.Type.__Internal*) __Instance)->isDependent = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class TypeQualifiers : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 3)]
public partial struct __Internal
{
[FieldOffset(0)]
internal byte isConst;
[FieldOffset(1)]
internal byte isVolatile;
[FieldOffset(2)]
internal byte isRestrict;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeQualifiers@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.TypeQualifiers> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.TypeQualifiers>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.TypeQualifiers __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeQualifiers(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypeQualifiers __CreateInstance(global::CppSharp.Parser.AST.TypeQualifiers.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeQualifiers(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypeQualifiers.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeQualifiers.__Internal));
*(global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) ret = native;
return ret.ToPointer();
}
private TypeQualifiers(global::CppSharp.Parser.AST.TypeQualifiers.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeQualifiers(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeQualifiers(global::CppSharp.Parser.AST.TypeQualifiers _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeQualifiers.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) _0.__Instance);
}
public TypeQualifiers()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeQualifiers.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.TypeQualifiers __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public bool IsConst
{
get
{
return ((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance)->isConst != 0;
}
set
{
((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance)->isConst = (byte) (value ? 1 : 0);
}
}
public bool IsVolatile
{
get
{
return ((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance)->isVolatile != 0;
}
set
{
((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance)->isVolatile = (byte) (value ? 1 : 0);
}
}
public bool IsRestrict
{
get
{
return ((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance)->isRestrict != 0;
}
set
{
((global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) __Instance)->isRestrict = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class QualifiedType : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::System.IntPtr type;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.TypeQualifiers.__Internal qualifiers;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0QualifiedType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0QualifiedType@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.QualifiedType> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.QualifiedType>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.QualifiedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.QualifiedType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.QualifiedType __CreateInstance(global::CppSharp.Parser.AST.QualifiedType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.QualifiedType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.QualifiedType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.QualifiedType.__Internal));
*(global::CppSharp.Parser.AST.QualifiedType.__Internal*) ret = native;
return ret.ToPointer();
}
private QualifiedType(global::CppSharp.Parser.AST.QualifiedType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected QualifiedType(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public QualifiedType()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.QualifiedType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.QualifiedType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.QualifiedType.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.QualifiedType __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Type Type
{
get
{
global::CppSharp.Parser.AST.Type __result0;
if (((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->type == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Type.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->type))
__result0 = (global::CppSharp.Parser.AST.Type) global::CppSharp.Parser.AST.Type.NativeToManagedMap[((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->type];
else __result0 = global::CppSharp.Parser.AST.Type.__CreateInstance(((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->type);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->type = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.TypeQualifiers Qualifiers
{
get
{
return global::CppSharp.Parser.AST.TypeQualifiers.__CreateInstance(((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->qualifiers);
}
set
{
((global::CppSharp.Parser.AST.QualifiedType.__Internal*) __Instance)->qualifiers = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.TypeQualifiers.__Internal() : *(global::CppSharp.Parser.AST.TypeQualifiers.__Internal*) value.__Instance;
}
}
}
public unsafe partial class TagType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::System.IntPtr declaration;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TagType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TagType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.TagType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TagType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TagType __CreateInstance(global::CppSharp.Parser.AST.TagType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TagType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TagType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TagType.__Internal));
global::CppSharp.Parser.AST.TagType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TagType(global::CppSharp.Parser.AST.TagType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TagType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TagType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TagType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TagType(global::CppSharp.Parser.AST.TagType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TagType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.Declaration Declaration
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.TagType.__Internal*) __Instance)->declaration == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TagType.__Internal*) __Instance)->declaration))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.TagType.__Internal*) __Instance)->declaration];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.TagType.__Internal*) __Instance)->declaration);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TagType.__Internal*) __Instance)->declaration = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ArrayType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(24)]
internal global::CppSharp.Parser.AST.ArrayType.ArraySize sizeType;
[FieldOffset(28)]
internal int size;
[FieldOffset(32)]
internal int elementSize;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ArrayType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ArrayType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public enum ArraySize
{
Constant = 0,
Variable = 1,
Dependent = 2,
Incomplete = 3
}
internal static new global::CppSharp.Parser.AST.ArrayType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ArrayType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ArrayType __CreateInstance(global::CppSharp.Parser.AST.ArrayType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ArrayType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ArrayType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ArrayType.__Internal));
global::CppSharp.Parser.AST.ArrayType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ArrayType(global::CppSharp.Parser.AST.ArrayType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ArrayType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ArrayType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ArrayType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ArrayType(global::CppSharp.Parser.AST.ArrayType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ArrayType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.ArrayType.ArraySize SizeType
{
get
{
return ((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->sizeType;
}
set
{
((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->sizeType = value;
}
}
public int Size
{
get
{
return ((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->size;
}
set
{
((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->size = value;
}
}
public int ElementSize
{
get
{
return ((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->elementSize;
}
set
{
((global::CppSharp.Parser.AST.ArrayType.__Internal*) __Instance)->elementSize = value;
}
}
}
public unsafe partial class FunctionType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 56)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal returnType;
[FieldOffset(24)]
internal global::CppSharp.Parser.AST.CallingConvention callingConvention;
[FieldOffset(28)]
internal global::CppSharp.Parser.AST.ExceptionSpecType exceptionSpecType;
[FieldOffset(32)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Parameter___N_std_S_allocator__S0_ Parameters;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FunctionType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FunctionType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1FunctionType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getParameters@FunctionType@AST@CppParser@CppSharp@@QEAAPEAVParameter@234@I@Z")]
internal static extern global::System.IntPtr GetParameters(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addParameters@FunctionType@AST@CppParser@CppSharp@@QEAAXAEAPEAVParameter@234@@Z")]
internal static extern void AddParameters(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearParameters@FunctionType@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearParameters(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getParametersCount@FunctionType@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetParametersCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.FunctionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FunctionType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.FunctionType __CreateInstance(global::CppSharp.Parser.AST.FunctionType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FunctionType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.FunctionType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionType.__Internal));
global::CppSharp.Parser.AST.FunctionType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private FunctionType(global::CppSharp.Parser.AST.FunctionType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected FunctionType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public FunctionType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public FunctionType(global::CppSharp.Parser.AST.FunctionType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Type __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Parameter GetParameters(uint i)
{
var __ret = __Internal.GetParameters((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Parameter __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Parameter.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Parameter) global::CppSharp.Parser.AST.Parameter.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Parameter.__CreateInstance(__ret);
return __result0;
}
public void AddParameters(global::CppSharp.Parser.AST.Parameter s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddParameters((__Instance + __PointerAdjustment), __arg0);
}
public void ClearParameters()
{
__Internal.ClearParameters((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.QualifiedType ReturnType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.FunctionType.__Internal*) __Instance)->returnType);
}
set
{
((global::CppSharp.Parser.AST.FunctionType.__Internal*) __Instance)->returnType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.CallingConvention CallingConvention
{
get
{
return ((global::CppSharp.Parser.AST.FunctionType.__Internal*) __Instance)->callingConvention;
}
set
{
((global::CppSharp.Parser.AST.FunctionType.__Internal*) __Instance)->callingConvention = value;
}
}
public global::CppSharp.Parser.AST.ExceptionSpecType ExceptionSpecType
{
get
{
return ((global::CppSharp.Parser.AST.FunctionType.__Internal*) __Instance)->exceptionSpecType;
}
set
{
((global::CppSharp.Parser.AST.FunctionType.__Internal*) __Instance)->exceptionSpecType = value;
}
}
public uint ParametersCount
{
get
{
var __ret = __Internal.GetParametersCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class PointerType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedPointee;
[FieldOffset(24)]
internal global::CppSharp.Parser.AST.PointerType.TypeModifier modifier;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0PointerType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0PointerType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public enum TypeModifier
{
Value = 0,
Pointer = 1,
LVReference = 2,
RVReference = 3
}
internal static new global::CppSharp.Parser.AST.PointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.PointerType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.PointerType __CreateInstance(global::CppSharp.Parser.AST.PointerType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.PointerType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.PointerType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PointerType.__Internal));
global::CppSharp.Parser.AST.PointerType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private PointerType(global::CppSharp.Parser.AST.PointerType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected PointerType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public PointerType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PointerType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public PointerType(global::CppSharp.Parser.AST.PointerType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PointerType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedPointee
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.PointerType.__Internal*) __Instance)->qualifiedPointee);
}
set
{
((global::CppSharp.Parser.AST.PointerType.__Internal*) __Instance)->qualifiedPointee = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.PointerType.TypeModifier Modifier
{
get
{
return ((global::CppSharp.Parser.AST.PointerType.__Internal*) __Instance)->modifier;
}
set
{
((global::CppSharp.Parser.AST.PointerType.__Internal*) __Instance)->modifier = value;
}
}
}
public unsafe partial class MemberPointerType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal pointee;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0MemberPointerType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0MemberPointerType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.MemberPointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.MemberPointerType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.MemberPointerType __CreateInstance(global::CppSharp.Parser.AST.MemberPointerType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.MemberPointerType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.MemberPointerType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MemberPointerType.__Internal));
global::CppSharp.Parser.AST.MemberPointerType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private MemberPointerType(global::CppSharp.Parser.AST.MemberPointerType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected MemberPointerType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public MemberPointerType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MemberPointerType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public MemberPointerType(global::CppSharp.Parser.AST.MemberPointerType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MemberPointerType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType Pointee
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.MemberPointerType.__Internal*) __Instance)->pointee);
}
set
{
((global::CppSharp.Parser.AST.MemberPointerType.__Internal*) __Instance)->pointee = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class TypedefType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::System.IntPtr declaration;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.TypedefType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypedefType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypedefType __CreateInstance(global::CppSharp.Parser.AST.TypedefType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypedefType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypedefType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefType.__Internal));
global::CppSharp.Parser.AST.TypedefType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefType(global::CppSharp.Parser.AST.TypedefType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TypedefType(global::CppSharp.Parser.AST.TypedefType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.TypedefNameDecl Declaration
{
get
{
global::CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((global::CppSharp.Parser.AST.TypedefType.__Internal*) __Instance)->declaration == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TypedefType.__Internal*) __Instance)->declaration))
__result0 = (global::CppSharp.Parser.AST.TypedefNameDecl) global::CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((global::CppSharp.Parser.AST.TypedefType.__Internal*) __Instance)->declaration];
else __result0 = global::CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((global::CppSharp.Parser.AST.TypedefType.__Internal*) __Instance)->declaration);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TypedefType.__Internal*) __Instance)->declaration = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class AttributedType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal modified;
[FieldOffset(24)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal equivalent;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0AttributedType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0AttributedType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.AttributedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.AttributedType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.AttributedType __CreateInstance(global::CppSharp.Parser.AST.AttributedType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.AttributedType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.AttributedType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.AttributedType.__Internal));
global::CppSharp.Parser.AST.AttributedType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private AttributedType(global::CppSharp.Parser.AST.AttributedType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected AttributedType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public AttributedType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.AttributedType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public AttributedType(global::CppSharp.Parser.AST.AttributedType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.AttributedType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType Modified
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.AttributedType.__Internal*) __Instance)->modified);
}
set
{
((global::CppSharp.Parser.AST.AttributedType.__Internal*) __Instance)->modified = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType Equivalent
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.AttributedType.__Internal*) __Instance)->equivalent);
}
set
{
((global::CppSharp.Parser.AST.AttributedType.__Internal*) __Instance)->equivalent = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class DecayedType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 56)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal decayed;
[FieldOffset(24)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal original;
[FieldOffset(40)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal pointee;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DecayedType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DecayedType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.DecayedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DecayedType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.DecayedType __CreateInstance(global::CppSharp.Parser.AST.DecayedType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DecayedType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.DecayedType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DecayedType.__Internal));
global::CppSharp.Parser.AST.DecayedType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private DecayedType(global::CppSharp.Parser.AST.DecayedType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected DecayedType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public DecayedType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DecayedType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public DecayedType(global::CppSharp.Parser.AST.DecayedType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DecayedType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType Decayed
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.DecayedType.__Internal*) __Instance)->decayed);
}
set
{
((global::CppSharp.Parser.AST.DecayedType.__Internal*) __Instance)->decayed = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType Original
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.DecayedType.__Internal*) __Instance)->original);
}
set
{
((global::CppSharp.Parser.AST.DecayedType.__Internal*) __Instance)->original = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType Pointee
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.DecayedType.__Internal*) __Instance)->pointee);
}
set
{
((global::CppSharp.Parser.AST.DecayedType.__Internal*) __Instance)->pointee = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class TemplateArgument : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TemplateArgument.ArgumentKind kind;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal type;
[FieldOffset(24)]
internal global::System.IntPtr declaration;
[FieldOffset(32)]
internal int integral;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateArgument@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateArgument@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public enum ArgumentKind
{
Type = 0,
Declaration = 1,
NullPtr = 2,
Integral = 3,
Template = 4,
TemplateExpansion = 5,
Expression = 6,
Pack = 7
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.TemplateArgument> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.TemplateArgument>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.TemplateArgument __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateArgument(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TemplateArgument __CreateInstance(global::CppSharp.Parser.AST.TemplateArgument.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateArgument(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TemplateArgument.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateArgument.__Internal));
*(global::CppSharp.Parser.AST.TemplateArgument.__Internal*) ret = native;
return ret.ToPointer();
}
private TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TemplateArgument(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TemplateArgument()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateArgument.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateArgument.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.TemplateArgument __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TemplateArgument.ArgumentKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->kind = value;
}
}
public global::CppSharp.Parser.AST.QualifiedType Type
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->type);
}
set
{
((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->type = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.Declaration Declaration
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->declaration == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->declaration))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->declaration];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->declaration);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->declaration = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public int Integral
{
get
{
return ((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->integral;
}
set
{
((global::CppSharp.Parser.AST.TemplateArgument.__Internal*) __Instance)->integral = value;
}
}
}
public unsafe partial class TemplateSpecializationType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 56)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(32)]
internal global::System.IntPtr _template;
[FieldOffset(40)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal desugared;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateSpecializationType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateSpecializationType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TemplateSpecializationType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@TemplateSpecializationType@AST@CppParser@CppSharp@@QEAA?AUTemplateArgument@234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@TemplateSpecializationType@AST@CppParser@CppSharp@@QEAAXAEAUTemplateArgument@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@TemplateSpecializationType@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@TemplateSpecializationType@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateSpecializationType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TemplateSpecializationType __CreateInstance(global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateSpecializationType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal));
global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TemplateSpecializationType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TemplateSpecializationType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializationType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Type __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TemplateArgument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.TemplateArgument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.TemplateArgument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Template Template
{
get
{
global::CppSharp.Parser.AST.Template __result0;
if (((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->_template == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Template.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->_template))
__result0 = (global::CppSharp.Parser.AST.Template) global::CppSharp.Parser.AST.Template.NativeToManagedMap[((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->_template];
else __result0 = global::CppSharp.Parser.AST.Template.__CreateInstance(((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->_template);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->_template = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType Desugared
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->desugared);
}
set
{
((global::CppSharp.Parser.AST.TemplateSpecializationType.__Internal*) __Instance)->desugared = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class DependentTemplateSpecializationType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(32)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal desugared;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAA?AUTemplateArgument@234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAAXAEAUTemplateArgument@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@DependentTemplateSpecializationType@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.DependentTemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DependentTemplateSpecializationType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.DependentTemplateSpecializationType __CreateInstance(global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DependentTemplateSpecializationType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal));
global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private DependentTemplateSpecializationType(global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected DependentTemplateSpecializationType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public DependentTemplateSpecializationType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.DependentTemplateSpecializationType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Type __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TemplateArgument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.TemplateArgument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.TemplateArgument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.QualifiedType Desugared
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal*) __Instance)->desugared);
}
set
{
((global::CppSharp.Parser.AST.DependentTemplateSpecializationType.__Internal*) __Instance)->desugared = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class TemplateParameterType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::System.IntPtr parameter;
[FieldOffset(16)]
internal uint depth;
[FieldOffset(20)]
internal uint index;
[FieldOffset(24)]
internal byte isParameterPack;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateParameterType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateParameterType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TemplateParameterType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TemplateParameterType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateParameterType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TemplateParameterType __CreateInstance(global::CppSharp.Parser.AST.TemplateParameterType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateParameterType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TemplateParameterType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameterType.__Internal));
global::CppSharp.Parser.AST.TemplateParameterType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TemplateParameterType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TemplateParameterType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameterType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameterType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Type __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TypeTemplateParameter Parameter
{
get
{
global::CppSharp.Parser.AST.TypeTemplateParameter __result0;
if (((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->parameter == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TypeTemplateParameter.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->parameter))
__result0 = (global::CppSharp.Parser.AST.TypeTemplateParameter) global::CppSharp.Parser.AST.TypeTemplateParameter.NativeToManagedMap[((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->parameter];
else __result0 = global::CppSharp.Parser.AST.TypeTemplateParameter.__CreateInstance(((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->parameter);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->parameter = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint Depth
{
get
{
return ((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->depth;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->depth = value;
}
}
public uint Index
{
get
{
return ((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->index;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->index = value;
}
}
public bool IsParameterPack
{
get
{
return ((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->isParameterPack != 0;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameterType.__Internal*) __Instance)->isParameterPack = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class TemplateParameterSubstitutionType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal replacement;
[FieldOffset(24)]
internal global::System.IntPtr replacedParameter;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateParameterSubstitutionType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateParameterSubstitutionType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateParameterSubstitutionType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TemplateParameterSubstitutionType __CreateInstance(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateParameterSubstitutionType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal));
global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TemplateParameterSubstitutionType(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TemplateParameterSubstitutionType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TemplateParameterSubstitutionType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TemplateParameterSubstitutionType(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType Replacement
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacement);
}
set
{
((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacement = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.TemplateParameterType ReplacedParameter
{
get
{
global::CppSharp.Parser.AST.TemplateParameterType __result0;
if (((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacedParameter == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TemplateParameterType.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacedParameter))
__result0 = (global::CppSharp.Parser.AST.TemplateParameterType) global::CppSharp.Parser.AST.TemplateParameterType.NativeToManagedMap[((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacedParameter];
else __result0 = global::CppSharp.Parser.AST.TemplateParameterType.__CreateInstance(((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacedParameter);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameterSubstitutionType.__Internal*) __Instance)->replacedParameter = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class InjectedClassNameType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal injectedSpecializationType;
[FieldOffset(24)]
internal global::System.IntPtr _class;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InjectedClassNameType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InjectedClassNameType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InjectedClassNameType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.InjectedClassNameType __CreateInstance(global::CppSharp.Parser.AST.InjectedClassNameType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InjectedClassNameType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.InjectedClassNameType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InjectedClassNameType.__Internal));
global::CppSharp.Parser.AST.InjectedClassNameType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private InjectedClassNameType(global::CppSharp.Parser.AST.InjectedClassNameType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected InjectedClassNameType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public InjectedClassNameType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InjectedClassNameType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public InjectedClassNameType(global::CppSharp.Parser.AST.InjectedClassNameType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InjectedClassNameType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType InjectedSpecializationType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->injectedSpecializationType);
}
set
{
((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->injectedSpecializationType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.Class Class
{
get
{
global::CppSharp.Parser.AST.Class __result0;
if (((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->_class == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Class.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->_class))
__result0 = (global::CppSharp.Parser.AST.Class) global::CppSharp.Parser.AST.Class.NativeToManagedMap[((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->_class];
else __result0 = global::CppSharp.Parser.AST.Class.__CreateInstance(((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->_class);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.InjectedClassNameType.__Internal*) __Instance)->_class = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class DependentNameType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 56)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifier;
[FieldOffset(24)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C identifier;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DependentNameType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DependentNameType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1DependentNameType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.DependentNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DependentNameType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.DependentNameType __CreateInstance(global::CppSharp.Parser.AST.DependentNameType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DependentNameType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.DependentNameType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DependentNameType.__Internal));
global::CppSharp.Parser.AST.DependentNameType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private DependentNameType(global::CppSharp.Parser.AST.DependentNameType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected DependentNameType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public DependentNameType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DependentNameType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DependentNameType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Type __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.QualifiedType Qualifier
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.DependentNameType.__Internal*) __Instance)->qualifier);
}
set
{
((global::CppSharp.Parser.AST.DependentNameType.__Internal*) __Instance)->qualifier = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public string Identifier
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.DependentNameType.__Internal*) __Instance)->identifier);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.DependentNameType.__Internal*) __Instance)->identifier = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class PackExpansionType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0PackExpansionType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0PackExpansionType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.PackExpansionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.PackExpansionType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.PackExpansionType __CreateInstance(global::CppSharp.Parser.AST.PackExpansionType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.PackExpansionType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.PackExpansionType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PackExpansionType.__Internal));
global::CppSharp.Parser.AST.PackExpansionType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private PackExpansionType(global::CppSharp.Parser.AST.PackExpansionType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected PackExpansionType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public PackExpansionType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PackExpansionType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public PackExpansionType(global::CppSharp.Parser.AST.PackExpansionType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PackExpansionType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
}
public unsafe partial class UnaryTransformType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal desugared;
[FieldOffset(24)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal baseType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0UnaryTransformType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0UnaryTransformType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.UnaryTransformType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.UnaryTransformType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.UnaryTransformType __CreateInstance(global::CppSharp.Parser.AST.UnaryTransformType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.UnaryTransformType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.UnaryTransformType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.UnaryTransformType.__Internal));
global::CppSharp.Parser.AST.UnaryTransformType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private UnaryTransformType(global::CppSharp.Parser.AST.UnaryTransformType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected UnaryTransformType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public UnaryTransformType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.UnaryTransformType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public UnaryTransformType(global::CppSharp.Parser.AST.UnaryTransformType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.UnaryTransformType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType Desugared
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.UnaryTransformType.__Internal*) __Instance)->desugared);
}
set
{
((global::CppSharp.Parser.AST.UnaryTransformType.__Internal*) __Instance)->desugared = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType BaseType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.UnaryTransformType.__Internal*) __Instance)->baseType);
}
set
{
((global::CppSharp.Parser.AST.UnaryTransformType.__Internal*) __Instance)->baseType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class VectorType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal elementType;
[FieldOffset(24)]
internal uint numElements;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VectorType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VectorType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.VectorType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VectorType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VectorType __CreateInstance(global::CppSharp.Parser.AST.VectorType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VectorType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VectorType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VectorType.__Internal));
global::CppSharp.Parser.AST.VectorType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VectorType(global::CppSharp.Parser.AST.VectorType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VectorType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VectorType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VectorType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VectorType(global::CppSharp.Parser.AST.VectorType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VectorType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.QualifiedType ElementType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.VectorType.__Internal*) __Instance)->elementType);
}
set
{
((global::CppSharp.Parser.AST.VectorType.__Internal*) __Instance)->elementType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public uint NumElements
{
get
{
return ((global::CppSharp.Parser.AST.VectorType.__Internal*) __Instance)->numElements;
}
set
{
((global::CppSharp.Parser.AST.VectorType.__Internal*) __Instance)->numElements = value;
}
}
}
public unsafe partial class BuiltinType : global::CppSharp.Parser.AST.Type, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 12)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.TypeKind kind;
[FieldOffset(4)]
internal byte isDependent;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.PrimitiveType type;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BuiltinType@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BuiltinType@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.BuiltinType __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BuiltinType(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.BuiltinType __CreateInstance(global::CppSharp.Parser.AST.BuiltinType.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BuiltinType(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.BuiltinType.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BuiltinType.__Internal));
global::CppSharp.Parser.AST.BuiltinType.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private BuiltinType(global::CppSharp.Parser.AST.BuiltinType.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected BuiltinType(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public BuiltinType()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BuiltinType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public BuiltinType(global::CppSharp.Parser.AST.BuiltinType _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BuiltinType.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public global::CppSharp.Parser.AST.PrimitiveType Type
{
get
{
return ((global::CppSharp.Parser.AST.BuiltinType.__Internal*) __Instance)->type;
}
set
{
((global::CppSharp.Parser.AST.BuiltinType.__Internal*) __Instance)->type = value;
}
}
}
public unsafe partial class VTableComponent : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.VTableComponentKind kind;
[FieldOffset(4)]
internal uint offset;
[FieldOffset(8)]
internal global::System.IntPtr declaration;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VTableComponent@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VTableComponent@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.VTableComponent> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.VTableComponent>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.VTableComponent __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VTableComponent(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VTableComponent __CreateInstance(global::CppSharp.Parser.AST.VTableComponent.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VTableComponent(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VTableComponent.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VTableComponent.__Internal));
*(global::CppSharp.Parser.AST.VTableComponent.__Internal*) ret = native;
return ret.ToPointer();
}
private VTableComponent(global::CppSharp.Parser.AST.VTableComponent.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VTableComponent(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VTableComponent()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VTableComponent.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VTableComponent.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.VTableComponent.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.VTableComponent __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.VTableComponentKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->kind = value;
}
}
public uint Offset
{
get
{
return ((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->offset;
}
set
{
((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->offset = value;
}
}
public global::CppSharp.Parser.AST.Declaration Declaration
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->declaration == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->declaration))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->declaration];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->declaration);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.VTableComponent.__Internal*) __Instance)->declaration = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class VTableLayout : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_VTableComponent___N_std_S_allocator__S0_ Components;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VTableLayout@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VTableLayout@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VTableLayout@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getComponents@VTableLayout@AST@CppParser@CppSharp@@QEAA?AUVTableComponent@234@I@Z")]
internal static extern void GetComponents(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addComponents@VTableLayout@AST@CppParser@CppSharp@@QEAAXAEAUVTableComponent@234@@Z")]
internal static extern void AddComponents(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearComponents@VTableLayout@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearComponents(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getComponentsCount@VTableLayout@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetComponentsCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.VTableLayout> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.VTableLayout>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.VTableLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VTableLayout(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VTableLayout __CreateInstance(global::CppSharp.Parser.AST.VTableLayout.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VTableLayout(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VTableLayout.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VTableLayout.__Internal));
global::CppSharp.Parser.AST.VTableLayout.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VTableLayout(global::CppSharp.Parser.AST.VTableLayout.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VTableLayout(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VTableLayout()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VTableLayout.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VTableLayout.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.VTableLayout __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.VTableComponent GetComponents(uint i)
{
var __ret = new global::CppSharp.Parser.AST.VTableComponent.__Internal();
__Internal.GetComponents((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.VTableComponent.__CreateInstance(__ret);
}
public void AddComponents(global::CppSharp.Parser.AST.VTableComponent s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddComponents((__Instance + __PointerAdjustment), __arg0);
}
public void ClearComponents()
{
__Internal.ClearComponents((__Instance + __PointerAdjustment));
}
public uint ComponentsCount
{
get
{
var __ret = __Internal.GetComponentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class VFTableInfo : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public partial struct __Internal
{
[FieldOffset(0)]
internal ulong VBTableIndex;
[FieldOffset(8)]
internal uint VFPtrOffset;
[FieldOffset(12)]
internal uint VFPtrFullOffset;
[FieldOffset(16)]
internal global::CppSharp.Parser.AST.VTableLayout.__Internal layout;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VFTableInfo@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VFTableInfo@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VFTableInfo@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.VFTableInfo> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.VFTableInfo>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.VFTableInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VFTableInfo(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VFTableInfo __CreateInstance(global::CppSharp.Parser.AST.VFTableInfo.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VFTableInfo(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VFTableInfo.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VFTableInfo.__Internal));
global::CppSharp.Parser.AST.VFTableInfo.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VFTableInfo(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VFTableInfo()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VFTableInfo.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VFTableInfo.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.VFTableInfo __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public ulong VBTableIndex
{
get
{
return ((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->VBTableIndex;
}
set
{
((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->VBTableIndex = value;
}
}
public uint VFPtrOffset
{
get
{
return ((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->VFPtrOffset;
}
set
{
((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->VFPtrOffset = value;
}
}
public uint VFPtrFullOffset
{
get
{
return ((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->VFPtrFullOffset;
}
set
{
((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->VFPtrFullOffset = value;
}
}
public global::CppSharp.Parser.AST.VTableLayout Layout
{
get
{
return global::CppSharp.Parser.AST.VTableLayout.__CreateInstance(((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->layout);
}
set
{
((global::CppSharp.Parser.AST.VFTableInfo.__Internal*) __Instance)->layout = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.VTableLayout.__Internal() : *(global::CppSharp.Parser.AST.VTableLayout.__Internal*) value.__Instance;
}
}
}
public unsafe partial class LayoutField : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 64)]
public partial struct __Internal
{
[FieldOffset(0)]
internal uint offset;
[FieldOffset(8)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(40)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(56)]
internal global::System.IntPtr fieldPtr;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0LayoutField@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0LayoutField@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr other);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1LayoutField@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.LayoutField> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.LayoutField>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.LayoutField __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.LayoutField(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.LayoutField __CreateInstance(global::CppSharp.Parser.AST.LayoutField.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.LayoutField(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.LayoutField.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.LayoutField.__Internal));
global::CppSharp.Parser.AST.LayoutField.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private LayoutField(global::CppSharp.Parser.AST.LayoutField.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected LayoutField(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public LayoutField()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.LayoutField.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public LayoutField(global::CppSharp.Parser.AST.LayoutField other)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.LayoutField.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(other, null))
throw new global::System.ArgumentNullException("other", "Cannot be null because it is a C++ reference (&).");
var __arg0 = other.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.LayoutField __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public uint Offset
{
get
{
return ((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->offset;
}
set
{
((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->offset = value;
}
}
public string Name
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->name);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->name = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::System.IntPtr FieldPtr
{
get
{
return ((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->fieldPtr;
}
set
{
((global::CppSharp.Parser.AST.LayoutField.__Internal*) __Instance)->fieldPtr = (global::System.IntPtr) value;
}
}
}
public unsafe partial class LayoutBase : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct __Internal
{
[FieldOffset(0)]
internal uint offset;
[FieldOffset(8)]
internal global::System.IntPtr _class;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0LayoutBase@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0LayoutBase@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr other);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1LayoutBase@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.LayoutBase> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.LayoutBase>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.LayoutBase __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.LayoutBase(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.LayoutBase __CreateInstance(global::CppSharp.Parser.AST.LayoutBase.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.LayoutBase(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.LayoutBase.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.LayoutBase.__Internal));
global::CppSharp.Parser.AST.LayoutBase.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private LayoutBase(global::CppSharp.Parser.AST.LayoutBase.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected LayoutBase(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public LayoutBase()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.LayoutBase.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.LayoutBase.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(other, null))
throw new global::System.ArgumentNullException("other", "Cannot be null because it is a C++ reference (&).");
var __arg0 = other.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.LayoutBase __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public uint Offset
{
get
{
return ((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->offset;
}
set
{
((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->offset = value;
}
}
public global::CppSharp.Parser.AST.Class Class
{
get
{
global::CppSharp.Parser.AST.Class __result0;
if (((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->_class == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Class.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->_class))
__result0 = (global::CppSharp.Parser.AST.Class) global::CppSharp.Parser.AST.Class.NativeToManagedMap[((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->_class];
else __result0 = global::CppSharp.Parser.AST.Class.__CreateInstance(((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->_class);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.LayoutBase.__Internal*) __Instance)->_class = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ClassLayout : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 128)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CppAbi ABI;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_VFTableInfo___N_std_S_allocator__S0_ VFTables;
[FieldOffset(32)]
internal global::CppSharp.Parser.AST.VTableLayout.__Internal layout;
[FieldOffset(56)]
internal byte hasOwnVFPtr;
[FieldOffset(60)]
internal int VBPtrOffset;
[FieldOffset(64)]
internal int alignment;
[FieldOffset(68)]
internal int size;
[FieldOffset(72)]
internal int dataSize;
[FieldOffset(80)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_LayoutField___N_std_S_allocator__S0_ Fields;
[FieldOffset(104)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_LayoutBase___N_std_S_allocator__S0_ Bases;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassLayout@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassLayout@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ClassLayout@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVFTables@ClassLayout@AST@CppParser@CppSharp@@QEAA?AUVFTableInfo@234@I@Z")]
internal static extern void GetVFTables(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addVFTables@ClassLayout@AST@CppParser@CppSharp@@QEAAXAEAUVFTableInfo@234@@Z")]
internal static extern void AddVFTables(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearVFTables@ClassLayout@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearVFTables(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFields@ClassLayout@AST@CppParser@CppSharp@@QEAA?AVLayoutField@234@I@Z")]
internal static extern void GetFields(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addFields@ClassLayout@AST@CppParser@CppSharp@@QEAAXAEAVLayoutField@234@@Z")]
internal static extern void AddFields(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearFields@ClassLayout@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearFields(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getBases@ClassLayout@AST@CppParser@CppSharp@@QEAA?AVLayoutBase@234@I@Z")]
internal static extern void GetBases(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addBases@ClassLayout@AST@CppParser@CppSharp@@QEAAXAEAVLayoutBase@234@@Z")]
internal static extern void AddBases(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearBases@ClassLayout@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearBases(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVFTablesCount@ClassLayout@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetVFTablesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFieldsCount@ClassLayout@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetFieldsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getBasesCount@ClassLayout@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetBasesCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.ClassLayout> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.ClassLayout>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.ClassLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassLayout(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ClassLayout __CreateInstance(global::CppSharp.Parser.AST.ClassLayout.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassLayout(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ClassLayout.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassLayout.__Internal));
global::CppSharp.Parser.AST.ClassLayout.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ClassLayout(global::CppSharp.Parser.AST.ClassLayout.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ClassLayout(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ClassLayout()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassLayout.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassLayout.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.ClassLayout __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.VFTableInfo GetVFTables(uint i)
{
var __ret = new global::CppSharp.Parser.AST.VFTableInfo.__Internal();
__Internal.GetVFTables((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.VFTableInfo.__CreateInstance(__ret);
}
public void AddVFTables(global::CppSharp.Parser.AST.VFTableInfo s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddVFTables((__Instance + __PointerAdjustment), __arg0);
}
public void ClearVFTables()
{
__Internal.ClearVFTables((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.LayoutField GetFields(uint i)
{
var __ret = new global::CppSharp.Parser.AST.LayoutField.__Internal();
__Internal.GetFields((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.LayoutField.__CreateInstance(__ret);
}
public void AddFields(global::CppSharp.Parser.AST.LayoutField s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddFields((__Instance + __PointerAdjustment), __arg0);
}
public void ClearFields()
{
__Internal.ClearFields((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.LayoutBase GetBases(uint i)
{
var __ret = new global::CppSharp.Parser.AST.LayoutBase.__Internal();
__Internal.GetBases((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.LayoutBase.__CreateInstance(__ret);
}
public void AddBases(global::CppSharp.Parser.AST.LayoutBase s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddBases((__Instance + __PointerAdjustment), __arg0);
}
public void ClearBases()
{
__Internal.ClearBases((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.CppAbi ABI
{
get
{
return ((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->ABI;
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->ABI = value;
}
}
public global::CppSharp.Parser.AST.VTableLayout Layout
{
get
{
return global::CppSharp.Parser.AST.VTableLayout.__CreateInstance(((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->layout);
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->layout = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.VTableLayout.__Internal() : *(global::CppSharp.Parser.AST.VTableLayout.__Internal*) value.__Instance;
}
}
public bool HasOwnVFPtr
{
get
{
return ((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->hasOwnVFPtr != 0;
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->hasOwnVFPtr = (byte) (value ? 1 : 0);
}
}
public int VBPtrOffset
{
get
{
return ((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->VBPtrOffset;
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->VBPtrOffset = value;
}
}
public int Alignment
{
get
{
return ((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->alignment;
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->alignment = value;
}
}
public int Size
{
get
{
return ((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->size;
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->size = value;
}
}
public int DataSize
{
get
{
return ((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->dataSize;
}
set
{
((global::CppSharp.Parser.AST.ClassLayout.__Internal*) __Instance)->dataSize = value;
}
}
public uint VFTablesCount
{
get
{
var __ret = __Internal.GetVFTablesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint FieldsCount
{
get
{
var __ret = __Internal.GetFieldsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint BasesCount
{
get
{
var __ret = __Internal.GetBasesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Declaration : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 224)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Declaration@AST@CppParser@CppSharp@@QEAA@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Declaration@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Declaration@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getPreprocessedEntities@Declaration@AST@CppParser@CppSharp@@QEAAPEAVPreprocessedEntity@234@I@Z")]
internal static extern global::System.IntPtr GetPreprocessedEntities(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addPreprocessedEntities@Declaration@AST@CppParser@CppSharp@@QEAAXAEAPEAVPreprocessedEntity@234@@Z")]
internal static extern void AddPreprocessedEntities(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearPreprocessedEntities@Declaration@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearPreprocessedEntities(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getRedeclarations@Declaration@AST@CppParser@CppSharp@@QEAAPEAV1234@I@Z")]
internal static extern global::System.IntPtr GetRedeclarations(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addRedeclarations@Declaration@AST@CppParser@CppSharp@@QEAAXAEAPEAV1234@@Z")]
internal static extern void AddRedeclarations(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearRedeclarations@Declaration@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearRedeclarations(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getPreprocessedEntitiesCount@Declaration@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetPreprocessedEntitiesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getRedeclarationsCount@Declaration@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetRedeclarationsCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Declaration> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Declaration>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.Declaration __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Declaration(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Declaration __CreateInstance(global::CppSharp.Parser.AST.Declaration.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Declaration(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Declaration.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Declaration.__Internal));
global::CppSharp.Parser.AST.Declaration.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Declaration(global::CppSharp.Parser.AST.Declaration.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Declaration(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Declaration(global::CppSharp.Parser.AST.DeclarationKind kind)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Declaration.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public Declaration(global::CppSharp.Parser.AST.Declaration _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Declaration.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.PreprocessedEntity GetPreprocessedEntities(uint i)
{
var __ret = __Internal.GetPreprocessedEntities((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.PreprocessedEntity __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.PreprocessedEntity.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.PreprocessedEntity) global::CppSharp.Parser.AST.PreprocessedEntity.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.PreprocessedEntity.__CreateInstance(__ret);
return __result0;
}
public void AddPreprocessedEntities(global::CppSharp.Parser.AST.PreprocessedEntity s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddPreprocessedEntities((__Instance + __PointerAdjustment), __arg0);
}
public void ClearPreprocessedEntities()
{
__Internal.ClearPreprocessedEntities((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Declaration GetRedeclarations(uint i)
{
var __ret = __Internal.GetRedeclarations((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Declaration __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(__ret);
return __result0;
}
public void AddRedeclarations(global::CppSharp.Parser.AST.Declaration s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddRedeclarations((__Instance + __PointerAdjustment), __arg0);
}
public void ClearRedeclarations()
{
__Internal.ClearRedeclarations((__Instance + __PointerAdjustment));
}
public static implicit operator global::CppSharp.Parser.AST.Declaration(global::CppSharp.Parser.AST.DeclarationKind kind)
{
return new global::CppSharp.Parser.AST.Declaration(kind);
}
public global::CppSharp.Parser.AST.DeclarationKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->kind = value;
}
}
public int MaxFieldAlignment
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->maxFieldAlignment;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->maxFieldAlignment = value;
}
}
public global::CppSharp.Parser.AST.AccessSpecifier Access
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->access;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->access = value;
}
}
public global::CppSharp.Parser.AST.DeclarationContext Namespace
{
get
{
global::CppSharp.Parser.AST.DeclarationContext __result0;
if (((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->_namespace == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.DeclarationContext.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->_namespace))
__result0 = (global::CppSharp.Parser.AST.DeclarationContext) global::CppSharp.Parser.AST.DeclarationContext.NativeToManagedMap[((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->_namespace];
else __result0 = global::CppSharp.Parser.AST.DeclarationContext.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->_namespace);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->_namespace = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.SourceLocation Location
{
get
{
return global::CppSharp.Parser.SourceLocation.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->location);
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->location = value.__Instance;
}
}
public int LineNumberStart
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->lineNumberStart;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->lineNumberStart = value;
}
}
public int LineNumberEnd
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->lineNumberEnd;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->lineNumberEnd = value;
}
}
public string Name
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->name);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->name = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string USR
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->USR);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->USR = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string DebugText
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->debugText);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->debugText = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public bool IsIncomplete
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isIncomplete != 0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isIncomplete = (byte) (value ? 1 : 0);
}
}
public bool IsDependent
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isDependent != 0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isDependent = (byte) (value ? 1 : 0);
}
}
public bool IsImplicit
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isImplicit != 0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isImplicit = (byte) (value ? 1 : 0);
}
}
public bool IsInvalid
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isInvalid != 0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->isInvalid = (byte) (value ? 1 : 0);
}
}
public global::CppSharp.Parser.AST.Declaration CompleteDeclaration
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->completeDeclaration == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->completeDeclaration))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->completeDeclaration];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->completeDeclaration);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->completeDeclaration = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint DefinitionOrder
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->definitionOrder;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->definitionOrder = value;
}
}
public global::System.IntPtr OriginalPtr
{
get
{
return ((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->originalPtr;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->originalPtr = (global::System.IntPtr) value;
}
}
public global::CppSharp.Parser.AST.RawComment Comment
{
get
{
global::CppSharp.Parser.AST.RawComment __result0;
if (((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->comment == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.RawComment.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->comment))
__result0 = (global::CppSharp.Parser.AST.RawComment) global::CppSharp.Parser.AST.RawComment.NativeToManagedMap[((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->comment];
else __result0 = global::CppSharp.Parser.AST.RawComment.__CreateInstance(((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->comment);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Declaration.__Internal*) __Instance)->comment = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint PreprocessedEntitiesCount
{
get
{
var __ret = __Internal.GetPreprocessedEntitiesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint RedeclarationsCount
{
get
{
var __ret = __Internal.GetRedeclarationsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class DeclarationContext : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 464)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DeclarationContext@AST@CppParser@CppSharp@@QEAA@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0DeclarationContext@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1DeclarationContext@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getNamespaces@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVNamespace@234@I@Z")]
internal static extern global::System.IntPtr GetNamespaces(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addNamespaces@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVNamespace@234@@Z")]
internal static extern void AddNamespaces(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearNamespaces@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearNamespaces(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getEnums@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVEnumeration@234@I@Z")]
internal static extern global::System.IntPtr GetEnums(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addEnums@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVEnumeration@234@@Z")]
internal static extern void AddEnums(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearEnums@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearEnums(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFunctions@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVFunction@234@I@Z")]
internal static extern global::System.IntPtr GetFunctions(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addFunctions@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVFunction@234@@Z")]
internal static extern void AddFunctions(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearFunctions@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearFunctions(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getClasses@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVClass@234@I@Z")]
internal static extern global::System.IntPtr GetClasses(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addClasses@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVClass@234@@Z")]
internal static extern void AddClasses(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearClasses@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearClasses(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTemplates@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVTemplate@234@I@Z")]
internal static extern global::System.IntPtr GetTemplates(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addTemplates@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVTemplate@234@@Z")]
internal static extern void AddTemplates(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearTemplates@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearTemplates(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVTypedefDecl@234@I@Z")]
internal static extern global::System.IntPtr GetTypedefs(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVTypedefDecl@234@@Z")]
internal static extern void AddTypedefs(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearTypedefs(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVTypeAlias@234@I@Z")]
internal static extern global::System.IntPtr GetTypeAliases(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVTypeAlias@234@@Z")]
internal static extern void AddTypeAliases(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearTypeAliases(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVVariable@234@I@Z")]
internal static extern global::System.IntPtr GetVariables(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addVariables@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVVariable@234@@Z")]
internal static extern void AddVariables(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearVariables@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearVariables(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFriends@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVFriend@234@I@Z")]
internal static extern global::System.IntPtr GetFriends(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addFriends@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVFriend@234@@Z")]
internal static extern void AddFriends(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearFriends@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearFriends(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getNamespacesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetNamespacesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getEnumsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetEnumsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFunctionsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetFunctionsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getClassesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetClassesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTemplatesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetTemplatesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetTypedefsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTypeAliasesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetTypeAliasesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetVariablesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFriendsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetFriendsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.DeclarationContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DeclarationContext(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.DeclarationContext __CreateInstance(global::CppSharp.Parser.AST.DeclarationContext.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.DeclarationContext(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.DeclarationContext.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DeclarationContext.__Internal));
global::CppSharp.Parser.AST.DeclarationContext.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected DeclarationContext(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public DeclarationContext(global::CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DeclarationContext.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.DeclarationContext.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Namespace GetNamespaces(uint i)
{
var __ret = __Internal.GetNamespaces((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Namespace __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Namespace.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Namespace) global::CppSharp.Parser.AST.Namespace.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Namespace.__CreateInstance(__ret);
return __result0;
}
public void AddNamespaces(global::CppSharp.Parser.AST.Namespace s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddNamespaces((__Instance + __PointerAdjustment), __arg0);
}
public void ClearNamespaces()
{
__Internal.ClearNamespaces((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Enumeration GetEnums(uint i)
{
var __ret = __Internal.GetEnums((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Enumeration __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Enumeration.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Enumeration) global::CppSharp.Parser.AST.Enumeration.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Enumeration.__CreateInstance(__ret);
return __result0;
}
public void AddEnums(global::CppSharp.Parser.AST.Enumeration s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddEnums((__Instance + __PointerAdjustment), __arg0);
}
public void ClearEnums()
{
__Internal.ClearEnums((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Function GetFunctions(uint i)
{
var __ret = __Internal.GetFunctions((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Function __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Function.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Function) global::CppSharp.Parser.AST.Function.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Function.__CreateInstance(__ret);
return __result0;
}
public void AddFunctions(global::CppSharp.Parser.AST.Function s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddFunctions((__Instance + __PointerAdjustment), __arg0);
}
public void ClearFunctions()
{
__Internal.ClearFunctions((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Class GetClasses(uint i)
{
var __ret = __Internal.GetClasses((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Class __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Class.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Class) global::CppSharp.Parser.AST.Class.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Class.__CreateInstance(__ret);
return __result0;
}
public void AddClasses(global::CppSharp.Parser.AST.Class s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddClasses((__Instance + __PointerAdjustment), __arg0);
}
public void ClearClasses()
{
__Internal.ClearClasses((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Template GetTemplates(uint i)
{
var __ret = __Internal.GetTemplates((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Template __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Template.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Template) global::CppSharp.Parser.AST.Template.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Template.__CreateInstance(__ret);
return __result0;
}
public void AddTemplates(global::CppSharp.Parser.AST.Template s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddTemplates((__Instance + __PointerAdjustment), __arg0);
}
public void ClearTemplates()
{
__Internal.ClearTemplates((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.TypedefDecl GetTypedefs(uint i)
{
var __ret = __Internal.GetTypedefs((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.TypedefDecl __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.TypedefDecl) global::CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.TypedefDecl.__CreateInstance(__ret);
return __result0;
}
public void AddTypedefs(global::CppSharp.Parser.AST.TypedefDecl s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddTypedefs((__Instance + __PointerAdjustment), __arg0);
}
public void ClearTypedefs()
{
__Internal.ClearTypedefs((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.TypeAlias GetTypeAliases(uint i)
{
var __ret = __Internal.GetTypeAliases((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.TypeAlias __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TypeAlias.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.TypeAlias) global::CppSharp.Parser.AST.TypeAlias.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.TypeAlias.__CreateInstance(__ret);
return __result0;
}
public void AddTypeAliases(global::CppSharp.Parser.AST.TypeAlias s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddTypeAliases((__Instance + __PointerAdjustment), __arg0);
}
public void ClearTypeAliases()
{
__Internal.ClearTypeAliases((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Variable GetVariables(uint i)
{
var __ret = __Internal.GetVariables((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Variable __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Variable.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Variable) global::CppSharp.Parser.AST.Variable.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Variable.__CreateInstance(__ret);
return __result0;
}
public void AddVariables(global::CppSharp.Parser.AST.Variable s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddVariables((__Instance + __PointerAdjustment), __arg0);
}
public void ClearVariables()
{
__Internal.ClearVariables((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Friend GetFriends(uint i)
{
var __ret = __Internal.GetFriends((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Friend __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Friend.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Friend) global::CppSharp.Parser.AST.Friend.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Friend.__CreateInstance(__ret);
return __result0;
}
public void AddFriends(global::CppSharp.Parser.AST.Friend s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddFriends((__Instance + __PointerAdjustment), __arg0);
}
public void ClearFriends()
{
__Internal.ClearFriends((__Instance + __PointerAdjustment));
}
public static implicit operator global::CppSharp.Parser.AST.DeclarationContext(global::CppSharp.Parser.AST.DeclarationKind kind)
{
return new global::CppSharp.Parser.AST.DeclarationContext(kind);
}
public bool IsAnonymous
{
get
{
return ((global::CppSharp.Parser.AST.DeclarationContext.__Internal*) __Instance)->isAnonymous != 0;
}
set
{
((global::CppSharp.Parser.AST.DeclarationContext.__Internal*) __Instance)->isAnonymous = (byte) (value ? 1 : 0);
}
}
public uint NamespacesCount
{
get
{
var __ret = __Internal.GetNamespacesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint EnumsCount
{
get
{
var __ret = __Internal.GetEnumsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint FunctionsCount
{
get
{
var __ret = __Internal.GetFunctionsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint ClassesCount
{
get
{
var __ret = __Internal.GetClassesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint TemplatesCount
{
get
{
var __ret = __Internal.GetTemplatesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint TypedefsCount
{
get
{
var __ret = __Internal.GetTypedefsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint TypeAliasesCount
{
get
{
var __ret = __Internal.GetTypeAliasesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint VariablesCount
{
get
{
var __ret = __Internal.GetVariablesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint FriendsCount
{
get
{
var __ret = __Internal.GetFriendsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class TypedefNameDecl : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefNameDecl@AST@CppParser@CppSharp@@QEAA@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefNameDecl@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypedefNameDecl@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TypedefNameDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypedefNameDecl(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypedefNameDecl __CreateInstance(global::CppSharp.Parser.AST.TypedefNameDecl.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypedefNameDecl(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypedefNameDecl.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefNameDecl.__Internal));
global::CppSharp.Parser.AST.TypedefNameDecl.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefNameDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefNameDecl(global::CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefNameDecl.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefNameDecl.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public static implicit operator global::CppSharp.Parser.AST.TypedefNameDecl(global::CppSharp.Parser.AST.DeclarationKind kind)
{
return new global::CppSharp.Parser.AST.TypedefNameDecl(kind);
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.TypedefNameDecl.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.TypedefNameDecl.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class TypedefDecl : global::CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefDecl@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefDecl@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypedefDecl@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TypedefDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypedefDecl(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypedefDecl __CreateInstance(global::CppSharp.Parser.AST.TypedefDecl.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypedefDecl(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypedefDecl.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefDecl.__Internal));
global::CppSharp.Parser.AST.TypedefDecl.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefDecl()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefDecl.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypedefDecl.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
public unsafe partial class TypeAlias : global::CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 248)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(240)]
internal global::System.IntPtr describedAliasTemplate;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeAlias@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeAlias@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypeAlias@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TypeAlias __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeAlias(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypeAlias __CreateInstance(global::CppSharp.Parser.AST.TypeAlias.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeAlias(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypeAlias.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeAlias.__Internal));
global::CppSharp.Parser.AST.TypeAlias.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAlias(global::CppSharp.Parser.AST.TypeAlias.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAlias(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAlias()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeAlias.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeAlias.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TypeAliasTemplate DescribedAliasTemplate
{
get
{
global::CppSharp.Parser.AST.TypeAliasTemplate __result0;
if (((global::CppSharp.Parser.AST.TypeAlias.__Internal*) __Instance)->describedAliasTemplate == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.TypeAlias.__Internal*) __Instance)->describedAliasTemplate))
__result0 = (global::CppSharp.Parser.AST.TypeAliasTemplate) global::CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap[((global::CppSharp.Parser.AST.TypeAlias.__Internal*) __Instance)->describedAliasTemplate];
else __result0 = global::CppSharp.Parser.AST.TypeAliasTemplate.__CreateInstance(((global::CppSharp.Parser.AST.TypeAlias.__Internal*) __Instance)->describedAliasTemplate);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.TypeAlias.__Internal*) __Instance)->describedAliasTemplate = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class Friend : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 232)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr declaration;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Friend@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Friend@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Friend@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Friend __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Friend(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Friend __CreateInstance(global::CppSharp.Parser.AST.Friend.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Friend(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Friend.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Friend.__Internal));
global::CppSharp.Parser.AST.Friend.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Friend(global::CppSharp.Parser.AST.Friend.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Friend(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Friend()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Friend.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Friend(global::CppSharp.Parser.AST.Friend _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Friend.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Declaration Declaration
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.Friend.__Internal*) __Instance)->declaration == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Friend.__Internal*) __Instance)->declaration))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.Friend.__Internal*) __Instance)->declaration];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.Friend.__Internal*) __Instance)->declaration);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Friend.__Internal*) __Instance)->declaration = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class Statement : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.StatementClass _class;
[FieldOffset(8)]
internal global::System.IntPtr decl;
[FieldOffset(16)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C @string;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Statement@AST@CppParser@CppSharp@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4StatementClass@123@PEAVDeclaration@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::System.IntPtr str, global::CppSharp.Parser.AST.StatementClass Class, global::System.IntPtr decl);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Statement@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Statement@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Statement> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Statement>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.Statement __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Statement(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Statement __CreateInstance(global::CppSharp.Parser.AST.Statement.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Statement(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Statement.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Statement.__Internal));
global::CppSharp.Parser.AST.Statement.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Statement(global::CppSharp.Parser.AST.Statement.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Statement(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Statement(string str, global::CppSharp.Parser.AST.StatementClass Class, global::CppSharp.Parser.AST.Declaration decl)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Statement.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(str, __allocator0);
var __arg0 = __basicString0.__Instance;
var __arg2 = ReferenceEquals(decl, null) ? global::System.IntPtr.Zero : decl.__Instance;
__Internal.ctor((__Instance + __PointerAdjustment), __arg0, Class, __arg2);
__basicString0.Dispose(false);
__allocator0.Dispose();
}
public Statement(global::CppSharp.Parser.AST.Statement _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Statement.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Statement __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.StatementClass Class
{
get
{
return ((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->_class;
}
set
{
((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->_class = value;
}
}
public global::CppSharp.Parser.AST.Declaration Decl
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->decl == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->decl))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->decl];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->decl);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->decl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public string String
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->@string);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Statement.__Internal*) __Instance)->@string = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class Expression : global::CppSharp.Parser.AST.Statement, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.StatementClass _class;
[FieldOffset(8)]
internal global::System.IntPtr decl;
[FieldOffset(16)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C @string;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Expression@AST@CppParser@CppSharp@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4StatementClass@123@PEAVDeclaration@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::System.IntPtr str, global::CppSharp.Parser.AST.StatementClass Class, global::System.IntPtr decl);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Expression@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Expression@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Expression __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Expression(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Expression __CreateInstance(global::CppSharp.Parser.AST.Expression.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Expression(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Expression.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Expression.__Internal));
global::CppSharp.Parser.AST.Expression.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Expression(global::CppSharp.Parser.AST.Expression.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Expression(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Expression(string str, global::CppSharp.Parser.AST.StatementClass Class, global::CppSharp.Parser.AST.Declaration decl)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Expression.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(str, __allocator0);
var __arg0 = __basicString0.__Instance;
var __arg2 = ReferenceEquals(decl, null) ? global::System.IntPtr.Zero : decl.__Instance;
__Internal.ctor((__Instance + __PointerAdjustment), __arg0, Class, __arg2);
__basicString0.Dispose(false);
__allocator0.Dispose();
}
public Expression(global::CppSharp.Parser.AST.Expression _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Expression.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Statement __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
public unsafe partial class BinaryOperator : global::CppSharp.Parser.AST.Expression, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 96)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.StatementClass _class;
[FieldOffset(8)]
internal global::System.IntPtr decl;
[FieldOffset(16)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C @string;
[FieldOffset(48)]
internal global::System.IntPtr LHS;
[FieldOffset(56)]
internal global::System.IntPtr RHS;
[FieldOffset(64)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C opcodeStr;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BinaryOperator@AST@CppParser@CppSharp@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVExpression@123@10@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::System.IntPtr str, global::System.IntPtr lhs, global::System.IntPtr rhs, global::System.IntPtr opcodeStr);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BinaryOperator@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1BinaryOperator@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.BinaryOperator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BinaryOperator(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.BinaryOperator __CreateInstance(global::CppSharp.Parser.AST.BinaryOperator.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BinaryOperator(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.BinaryOperator.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BinaryOperator.__Internal));
global::CppSharp.Parser.AST.BinaryOperator.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected BinaryOperator(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public BinaryOperator(string str, global::CppSharp.Parser.AST.Expression lhs, global::CppSharp.Parser.AST.Expression rhs, string opcodeStr)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BinaryOperator.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(str, __allocator0);
var __arg0 = __basicString0.__Instance;
var __arg1 = ReferenceEquals(lhs, null) ? global::System.IntPtr.Zero : lhs.__Instance;
var __arg2 = ReferenceEquals(rhs, null) ? global::System.IntPtr.Zero : rhs.__Instance;
var __allocator3 = new global::Std.Allocator<sbyte>();
var __basicString3 = global::Std.BasicStringExtensions.BasicString(opcodeStr, __allocator3);
var __arg3 = __basicString3.__Instance;
__Internal.ctor((__Instance + __PointerAdjustment), __arg0, __arg1, __arg2, __arg3);
__basicString0.Dispose(false);
__allocator0.Dispose();
__basicString3.Dispose(false);
__allocator3.Dispose();
}
public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BinaryOperator.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Statement __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Expression LHS
{
get
{
global::CppSharp.Parser.AST.Expression __result0;
if (((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->LHS == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Expression.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->LHS))
__result0 = (global::CppSharp.Parser.AST.Expression) global::CppSharp.Parser.AST.Expression.NativeToManagedMap[((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->LHS];
else __result0 = global::CppSharp.Parser.AST.Expression.__CreateInstance(((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->LHS);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->LHS = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.Expression RHS
{
get
{
global::CppSharp.Parser.AST.Expression __result0;
if (((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->RHS == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Expression.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->RHS))
__result0 = (global::CppSharp.Parser.AST.Expression) global::CppSharp.Parser.AST.Expression.NativeToManagedMap[((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->RHS];
else __result0 = global::CppSharp.Parser.AST.Expression.__CreateInstance(((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->RHS);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->RHS = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public string OpcodeStr
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->opcodeStr);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.BinaryOperator.__Internal*) __Instance)->opcodeStr = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class CallExpr : global::CppSharp.Parser.AST.Expression, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 72)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.StatementClass _class;
[FieldOffset(8)]
internal global::System.IntPtr decl;
[FieldOffset(16)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C @string;
[FieldOffset(48)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Expression___N_std_S_allocator__S0_ Arguments;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0CallExpr@AST@CppParser@CppSharp@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVDeclaration@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::System.IntPtr str, global::System.IntPtr decl);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0CallExpr@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1CallExpr@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@CallExpr@AST@CppParser@CppSharp@@QEAAPEAVExpression@234@I@Z")]
internal static extern global::System.IntPtr GetArguments(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@CallExpr@AST@CppParser@CppSharp@@QEAAXAEAPEAVExpression@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@CallExpr@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@CallExpr@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.CallExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.CallExpr(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.CallExpr __CreateInstance(global::CppSharp.Parser.AST.CallExpr.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.CallExpr(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.CallExpr.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.CallExpr.__Internal));
global::CppSharp.Parser.AST.CallExpr.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private CallExpr(global::CppSharp.Parser.AST.CallExpr.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected CallExpr(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public CallExpr(string str, global::CppSharp.Parser.AST.Declaration decl)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.CallExpr.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(str, __allocator0);
var __arg0 = __basicString0.__Instance;
var __arg1 = ReferenceEquals(decl, null) ? global::System.IntPtr.Zero : decl.__Instance;
__Internal.ctor((__Instance + __PointerAdjustment), __arg0, __arg1);
__basicString0.Dispose(false);
__allocator0.Dispose();
}
public CallExpr(global::CppSharp.Parser.AST.CallExpr _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.CallExpr.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Statement __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Expression GetArguments(uint i)
{
var __ret = __Internal.GetArguments((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Expression __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Expression.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Expression) global::CppSharp.Parser.AST.Expression.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Expression.__CreateInstance(__ret);
return __result0;
}
public void AddArguments(global::CppSharp.Parser.AST.Expression s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class CXXConstructExpr : global::CppSharp.Parser.AST.Expression, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 72)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.StatementClass _class;
[FieldOffset(8)]
internal global::System.IntPtr decl;
[FieldOffset(16)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C @string;
[FieldOffset(48)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Expression___N_std_S_allocator__S0_ Arguments;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0CXXConstructExpr@AST@CppParser@CppSharp@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVDeclaration@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::System.IntPtr str, global::System.IntPtr decl);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0CXXConstructExpr@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1CXXConstructExpr@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@CXXConstructExpr@AST@CppParser@CppSharp@@QEAAPEAVExpression@234@I@Z")]
internal static extern global::System.IntPtr GetArguments(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@CXXConstructExpr@AST@CppParser@CppSharp@@QEAAXAEAPEAVExpression@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@CXXConstructExpr@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@CXXConstructExpr@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.CXXConstructExpr(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.CXXConstructExpr __CreateInstance(global::CppSharp.Parser.AST.CXXConstructExpr.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.CXXConstructExpr(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.CXXConstructExpr.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.CXXConstructExpr.__Internal));
global::CppSharp.Parser.AST.CXXConstructExpr.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected CXXConstructExpr(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public CXXConstructExpr(string str, global::CppSharp.Parser.AST.Declaration decl)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.CXXConstructExpr.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(str, __allocator0);
var __arg0 = __basicString0.__Instance;
var __arg1 = ReferenceEquals(decl, null) ? global::System.IntPtr.Zero : decl.__Instance;
__Internal.ctor((__Instance + __PointerAdjustment), __arg0, __arg1);
__basicString0.Dispose(false);
__allocator0.Dispose();
}
public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.CXXConstructExpr.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Statement __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Expression GetArguments(uint i)
{
var __ret = __Internal.GetArguments((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Expression __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Expression.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Expression) global::CppSharp.Parser.AST.Expression.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Expression.__CreateInstance(__ret);
return __result0;
}
public void AddArguments(global::CppSharp.Parser.AST.Expression s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Parameter : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 256)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(240)]
internal byte isIndirect;
[FieldOffset(241)]
internal byte hasDefaultValue;
[FieldOffset(244)]
internal uint index;
[FieldOffset(248)]
internal global::System.IntPtr defaultArgument;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Parameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Parameter@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Parameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Parameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Parameter(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Parameter __CreateInstance(global::CppSharp.Parser.AST.Parameter.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Parameter(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Parameter.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Parameter.__Internal));
global::CppSharp.Parser.AST.Parameter.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Parameter(global::CppSharp.Parser.AST.Parameter.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Parameter(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Parameter()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Parameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Parameter(global::CppSharp.Parser.AST.Parameter _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Parameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public bool IsIndirect
{
get
{
return ((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->isIndirect != 0;
}
set
{
((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->isIndirect = (byte) (value ? 1 : 0);
}
}
public bool HasDefaultValue
{
get
{
return ((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->hasDefaultValue != 0;
}
set
{
((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->hasDefaultValue = (byte) (value ? 1 : 0);
}
}
public uint Index
{
get
{
return ((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->index;
}
set
{
((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->index = value;
}
}
public global::CppSharp.Parser.AST.Expression DefaultArgument
{
get
{
global::CppSharp.Parser.AST.Expression __result0;
if (((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->defaultArgument == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Expression.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->defaultArgument))
__result0 = (global::CppSharp.Parser.AST.Expression) global::CppSharp.Parser.AST.Expression.NativeToManagedMap[((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->defaultArgument];
else __result0 = global::CppSharp.Parser.AST.Expression.__CreateInstance(((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->defaultArgument);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Parameter.__Internal*) __Instance)->defaultArgument = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class Function : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 656)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal returnType;
[FieldOffset(480)]
internal byte isReturnIndirect;
[FieldOffset(481)]
internal byte hasThisReturn;
[FieldOffset(482)]
internal byte isConstExpr;
[FieldOffset(483)]
internal byte isVariadic;
[FieldOffset(484)]
internal byte isInline;
[FieldOffset(485)]
internal byte isPure;
[FieldOffset(486)]
internal byte isDeleted;
[FieldOffset(487)]
internal byte isDefaulted;
[FieldOffset(488)]
internal global::CppSharp.Parser.AST.FriendKind friendKind;
[FieldOffset(492)]
internal global::CppSharp.Parser.AST.CXXOperatorKind operatorKind;
[FieldOffset(496)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C mangled;
[FieldOffset(528)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C signature;
[FieldOffset(560)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C body;
[FieldOffset(592)]
internal global::CppSharp.Parser.AST.CallingConvention callingConvention;
[FieldOffset(600)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Parameter___N_std_S_allocator__S0_ Parameters;
[FieldOffset(624)]
internal global::System.IntPtr specializationInfo;
[FieldOffset(632)]
internal global::System.IntPtr instantiatedFrom;
[FieldOffset(640)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Function@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Function@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Function@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getParameters@Function@AST@CppParser@CppSharp@@QEAAPEAVParameter@234@I@Z")]
internal static extern global::System.IntPtr GetParameters(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addParameters@Function@AST@CppParser@CppSharp@@QEAAXAEAPEAVParameter@234@@Z")]
internal static extern void AddParameters(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearParameters@Function@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearParameters(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getParametersCount@Function@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetParametersCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.Function __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Function(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Function __CreateInstance(global::CppSharp.Parser.AST.Function.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Function(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Function.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Function.__Internal));
global::CppSharp.Parser.AST.Function.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Function(global::CppSharp.Parser.AST.Function.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Function(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Function()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Function.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Function(global::CppSharp.Parser.AST.Function _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Function.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Parameter GetParameters(uint i)
{
var __ret = __Internal.GetParameters((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Parameter __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Parameter.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Parameter) global::CppSharp.Parser.AST.Parameter.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Parameter.__CreateInstance(__ret);
return __result0;
}
public void AddParameters(global::CppSharp.Parser.AST.Parameter s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddParameters((__Instance + __PointerAdjustment), __arg0);
}
public void ClearParameters()
{
__Internal.ClearParameters((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.QualifiedType ReturnType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->returnType);
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->returnType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public bool IsReturnIndirect
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isReturnIndirect != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isReturnIndirect = (byte) (value ? 1 : 0);
}
}
public bool HasThisReturn
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->hasThisReturn != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->hasThisReturn = (byte) (value ? 1 : 0);
}
}
public bool IsConstExpr
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isConstExpr != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isConstExpr = (byte) (value ? 1 : 0);
}
}
public bool IsVariadic
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isVariadic != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isVariadic = (byte) (value ? 1 : 0);
}
}
public bool IsInline
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isInline != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isInline = (byte) (value ? 1 : 0);
}
}
public bool IsPure
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isPure != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isPure = (byte) (value ? 1 : 0);
}
}
public bool IsDeleted
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isDeleted != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isDeleted = (byte) (value ? 1 : 0);
}
}
public bool IsDefaulted
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isDefaulted != 0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->isDefaulted = (byte) (value ? 1 : 0);
}
}
public global::CppSharp.Parser.AST.FriendKind FriendKind
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->friendKind;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->friendKind = value;
}
}
public global::CppSharp.Parser.AST.CXXOperatorKind OperatorKind
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->operatorKind;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->operatorKind = value;
}
}
public string Mangled
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->mangled);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->mangled = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string Signature
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->signature);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->signature = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string Body
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->body);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->body = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.CallingConvention CallingConvention
{
get
{
return ((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->callingConvention;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->callingConvention = value;
}
}
public global::CppSharp.Parser.AST.FunctionTemplateSpecialization SpecializationInfo
{
get
{
global::CppSharp.Parser.AST.FunctionTemplateSpecialization __result0;
if (((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->specializationInfo == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.FunctionTemplateSpecialization.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->specializationInfo))
__result0 = (global::CppSharp.Parser.AST.FunctionTemplateSpecialization) global::CppSharp.Parser.AST.FunctionTemplateSpecialization.NativeToManagedMap[((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->specializationInfo];
else __result0 = global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->specializationInfo);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->specializationInfo = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.Function InstantiatedFrom
{
get
{
global::CppSharp.Parser.AST.Function __result0;
if (((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->instantiatedFrom == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Function.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->instantiatedFrom))
__result0 = (global::CppSharp.Parser.AST.Function) global::CppSharp.Parser.AST.Function.NativeToManagedMap[((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->instantiatedFrom];
else __result0 = global::CppSharp.Parser.AST.Function.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->instantiatedFrom);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->instantiatedFrom = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.Function.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public uint ParametersCount
{
get
{
var __ret = __Internal.GetParametersCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 720)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal returnType;
[FieldOffset(480)]
internal byte isReturnIndirect;
[FieldOffset(481)]
internal byte hasThisReturn;
[FieldOffset(482)]
internal byte isConstExpr;
[FieldOffset(483)]
internal byte isVariadic;
[FieldOffset(484)]
internal byte isInline;
[FieldOffset(485)]
internal byte isPure;
[FieldOffset(486)]
internal byte isDeleted;
[FieldOffset(487)]
internal byte isDefaulted;
[FieldOffset(488)]
internal global::CppSharp.Parser.AST.FriendKind friendKind;
[FieldOffset(492)]
internal global::CppSharp.Parser.AST.CXXOperatorKind operatorKind;
[FieldOffset(496)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C mangled;
[FieldOffset(528)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C signature;
[FieldOffset(560)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C body;
[FieldOffset(592)]
internal global::CppSharp.Parser.AST.CallingConvention callingConvention;
[FieldOffset(600)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Parameter___N_std_S_allocator__S0_ Parameters;
[FieldOffset(624)]
internal global::System.IntPtr specializationInfo;
[FieldOffset(632)]
internal global::System.IntPtr instantiatedFrom;
[FieldOffset(640)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(656)]
internal byte isVirtual;
[FieldOffset(657)]
internal byte isStatic;
[FieldOffset(658)]
internal byte isConst;
[FieldOffset(659)]
internal byte isExplicit;
[FieldOffset(660)]
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
[FieldOffset(664)]
internal byte isDefaultConstructor;
[FieldOffset(665)]
internal byte isCopyConstructor;
[FieldOffset(666)]
internal byte isMoveConstructor;
[FieldOffset(672)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal conversionType;
[FieldOffset(688)]
internal global::CppSharp.Parser.AST.RefQualifierKind refQualifier;
[FieldOffset(696)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Method___N_std_S_allocator__S0_ OverriddenMethods;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Method@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Method@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Method@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getOverriddenMethods@Method@AST@CppParser@CppSharp@@QEAAPEAV1234@I@Z")]
internal static extern global::System.IntPtr GetOverriddenMethods(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addOverriddenMethods@Method@AST@CppParser@CppSharp@@QEAAXAEAPEAV1234@@Z")]
internal static extern void AddOverriddenMethods(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearOverriddenMethods@Method@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearOverriddenMethods(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getOverriddenMethodsCount@Method@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetOverriddenMethodsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.Method __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Method(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Method __CreateInstance(global::CppSharp.Parser.AST.Method.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Method(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Method.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Method.__Internal));
global::CppSharp.Parser.AST.Method.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Method(global::CppSharp.Parser.AST.Method.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Method(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Method()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Method.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Method(global::CppSharp.Parser.AST.Method _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Method.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Method GetOverriddenMethods(uint i)
{
var __ret = __Internal.GetOverriddenMethods((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Method __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Method.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Method) global::CppSharp.Parser.AST.Method.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Method.__CreateInstance(__ret);
return __result0;
}
public void AddOverriddenMethods(global::CppSharp.Parser.AST.Method s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddOverriddenMethods((__Instance + __PointerAdjustment), __arg0);
}
public void ClearOverriddenMethods()
{
__Internal.ClearOverriddenMethods((__Instance + __PointerAdjustment));
}
public bool IsVirtual
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isVirtual != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isVirtual = (byte) (value ? 1 : 0);
}
}
public bool IsStatic
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isStatic != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isStatic = (byte) (value ? 1 : 0);
}
}
public bool IsConst
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isConst != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isConst = (byte) (value ? 1 : 0);
}
}
public bool IsExplicit
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isExplicit != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isExplicit = (byte) (value ? 1 : 0);
}
}
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->methodKind;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->methodKind = value;
}
}
public bool IsDefaultConstructor
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isDefaultConstructor != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isDefaultConstructor = (byte) (value ? 1 : 0);
}
}
public bool IsCopyConstructor
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isCopyConstructor != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isCopyConstructor = (byte) (value ? 1 : 0);
}
}
public bool IsMoveConstructor
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isMoveConstructor != 0;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->isMoveConstructor = (byte) (value ? 1 : 0);
}
}
public global::CppSharp.Parser.AST.QualifiedType ConversionType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->conversionType);
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->conversionType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.RefQualifierKind RefQualifier
{
get
{
return ((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->refQualifier;
}
set
{
((global::CppSharp.Parser.AST.Method.__Internal*) __Instance)->refQualifier = value;
}
}
public uint OverriddenMethodsCount
{
get
{
var __ret = __Internal.GetOverriddenMethodsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Enumeration : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 512)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal global::CppSharp.Parser.AST.Enumeration.EnumModifiers modifiers;
[FieldOffset(472)]
internal global::System.IntPtr type;
[FieldOffset(480)]
internal global::System.IntPtr builtinType;
[FieldOffset(488)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration_S_Item___N_std_S_allocator__S0_ Items;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Enumeration@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Enumeration@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Enumeration@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getItems@Enumeration@AST@CppParser@CppSharp@@QEAAPEAVItem@1234@I@Z")]
internal static extern global::System.IntPtr GetItems(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addItems@Enumeration@AST@CppParser@CppSharp@@QEAAXAEAPEAVItem@1234@@Z")]
internal static extern void AddItems(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearItems@Enumeration@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearItems(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindItemByName@Enumeration@AST@CppParser@CppSharp@@QEAAPEAVItem@1234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindItemByName(global::System.IntPtr instance, global::System.IntPtr Name);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getItemsCount@Enumeration@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetItemsCount(global::System.IntPtr instance);
}
[Flags]
public enum EnumModifiers
{
Anonymous = 1,
Scoped = 2,
Flags = 4
}
public unsafe partial class Item : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 264)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C expression;
[FieldOffset(256)]
internal ulong value;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Item@Enumeration@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Item@Enumeration@AST@CppParser@CppSharp@@QEAA@AEBV01234@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Item@Enumeration@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Enumeration.Item __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Enumeration.Item(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Enumeration.Item __CreateInstance(global::CppSharp.Parser.AST.Enumeration.Item.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Enumeration.Item(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Enumeration.Item.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Enumeration.Item.__Internal));
global::CppSharp.Parser.AST.Enumeration.Item.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Item(global::CppSharp.Parser.AST.Enumeration.Item.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Item(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Item()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Enumeration.Item.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Item(global::CppSharp.Parser.AST.Enumeration.Item _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Enumeration.Item.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Expression
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Enumeration.Item.__Internal*) __Instance)->expression);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Enumeration.Item.__Internal*) __Instance)->expression = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public ulong Value
{
get
{
return ((global::CppSharp.Parser.AST.Enumeration.Item.__Internal*) __Instance)->value;
}
set
{
((global::CppSharp.Parser.AST.Enumeration.Item.__Internal*) __Instance)->value = value;
}
}
}
internal static new global::CppSharp.Parser.AST.Enumeration __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Enumeration(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Enumeration __CreateInstance(global::CppSharp.Parser.AST.Enumeration.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Enumeration(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Enumeration.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Enumeration.__Internal));
global::CppSharp.Parser.AST.Enumeration.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Enumeration(global::CppSharp.Parser.AST.Enumeration.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Enumeration(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Enumeration()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Enumeration.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Enumeration(global::CppSharp.Parser.AST.Enumeration _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Enumeration.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Enumeration.Item GetItems(uint i)
{
var __ret = __Internal.GetItems((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Enumeration.Item __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Enumeration.Item.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Enumeration.Item) global::CppSharp.Parser.AST.Enumeration.Item.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Enumeration.Item.__CreateInstance(__ret);
return __result0;
}
public void AddItems(global::CppSharp.Parser.AST.Enumeration.Item s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddItems((__Instance + __PointerAdjustment), __arg0);
}
public void ClearItems()
{
__Internal.ClearItems((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Enumeration.Item FindItemByName(string Name)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(Name, __allocator0);
var __arg0 = __basicString0.__Instance;
var __ret = __Internal.FindItemByName((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.Enumeration.Item __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Enumeration.Item.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Enumeration.Item) global::CppSharp.Parser.AST.Enumeration.Item.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Enumeration.Item.__CreateInstance(__ret);
return __result0;
}
public global::CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers
{
get
{
return ((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->modifiers;
}
set
{
((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->modifiers = value;
}
}
public global::CppSharp.Parser.AST.Type Type
{
get
{
global::CppSharp.Parser.AST.Type __result0;
if (((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->type == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Type.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->type))
__result0 = (global::CppSharp.Parser.AST.Type) global::CppSharp.Parser.AST.Type.NativeToManagedMap[((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->type];
else __result0 = global::CppSharp.Parser.AST.Type.__CreateInstance(((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->type);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->type = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.BuiltinType BuiltinType
{
get
{
global::CppSharp.Parser.AST.BuiltinType __result0;
if (((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->builtinType == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.BuiltinType.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->builtinType))
__result0 = (global::CppSharp.Parser.AST.BuiltinType) global::CppSharp.Parser.AST.BuiltinType.NativeToManagedMap[((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->builtinType];
else __result0 = global::CppSharp.Parser.AST.BuiltinType.__CreateInstance(((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->builtinType);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Enumeration.__Internal*) __Instance)->builtinType = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint ItemsCount
{
get
{
var __ret = __Internal.GetItemsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Variable : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 272)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C mangled;
[FieldOffset(256)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Variable@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Variable@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Variable@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Variable __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Variable(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Variable __CreateInstance(global::CppSharp.Parser.AST.Variable.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Variable(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Variable.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Variable.__Internal));
global::CppSharp.Parser.AST.Variable.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Variable(global::CppSharp.Parser.AST.Variable.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Variable(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Variable()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Variable.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Variable(global::CppSharp.Parser.AST.Variable _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Variable.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Mangled
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.Variable.__Internal*) __Instance)->mangled);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.Variable.__Internal*) __Instance)->mangled = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.Variable.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.Variable.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class BaseClassSpecifier : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(4)]
internal byte isVirtual;
[FieldOffset(8)]
internal global::System.IntPtr type;
[FieldOffset(16)]
internal int offset;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BaseClassSpecifier@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BaseClassSpecifier@AST@CppParser@CppSharp@@QEAA@AEBU0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.BaseClassSpecifier> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.BaseClassSpecifier>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BaseClassSpecifier(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.BaseClassSpecifier __CreateInstance(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BaseClassSpecifier(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal));
*(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) ret = native;
return ret.ToPointer();
}
private BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected BaseClassSpecifier(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public BaseClassSpecifier()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.BaseClassSpecifier __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.AccessSpecifier Access
{
get
{
return ((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->access;
}
set
{
((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->access = value;
}
}
public bool IsVirtual
{
get
{
return ((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->isVirtual != 0;
}
set
{
((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->isVirtual = (byte) (value ? 1 : 0);
}
}
public global::CppSharp.Parser.AST.Type Type
{
get
{
global::CppSharp.Parser.AST.Type __result0;
if (((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->type == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Type.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->type))
__result0 = (global::CppSharp.Parser.AST.Type) global::CppSharp.Parser.AST.Type.NativeToManagedMap[((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->type];
else __result0 = global::CppSharp.Parser.AST.Type.__CreateInstance(((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->type);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->type = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public int Offset
{
get
{
return ((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->offset;
}
set
{
((global::CppSharp.Parser.AST.BaseClassSpecifier.__Internal*) __Instance)->offset = value;
}
}
}
public unsafe partial class Field : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 256)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(240)]
internal global::System.IntPtr _class;
[FieldOffset(248)]
internal byte isBitField;
[FieldOffset(252)]
internal uint bitWidth;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Field@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Field@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Field@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Field __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Field(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Field __CreateInstance(global::CppSharp.Parser.AST.Field.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Field(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Field.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Field.__Internal));
global::CppSharp.Parser.AST.Field.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Field(global::CppSharp.Parser.AST.Field.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Field(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Field()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Field.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Field(global::CppSharp.Parser.AST.Field _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Field.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->qualifiedType);
}
set
{
((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->qualifiedType = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
public global::CppSharp.Parser.AST.Class Class
{
get
{
global::CppSharp.Parser.AST.Class __result0;
if (((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->_class == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Class.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->_class))
__result0 = (global::CppSharp.Parser.AST.Class) global::CppSharp.Parser.AST.Class.NativeToManagedMap[((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->_class];
else __result0 = global::CppSharp.Parser.AST.Class.__CreateInstance(((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->_class);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->_class = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public bool IsBitField
{
get
{
return ((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->isBitField != 0;
}
set
{
((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->isBitField = (byte) (value ? 1 : 0);
}
}
public uint BitWidth
{
get
{
return ((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->bitWidth;
}
set
{
((global::CppSharp.Parser.AST.Field.__Internal*) __Instance)->bitWidth = value;
}
}
}
public unsafe partial class AccessSpecifierDecl : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 224)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0AccessSpecifierDecl@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0AccessSpecifierDecl@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1AccessSpecifierDecl@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.AccessSpecifierDecl(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.AccessSpecifierDecl __CreateInstance(global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.AccessSpecifierDecl(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal));
global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected AccessSpecifierDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public AccessSpecifierDecl()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.AccessSpecifierDecl.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
public unsafe partial class Class : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 584)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_BaseClassSpecifier___N_std_S_allocator__S0_ Bases;
[FieldOffset(488)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Field___N_std_S_allocator__S0_ Fields;
[FieldOffset(512)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Method___N_std_S_allocator__S0_ Methods;
[FieldOffset(536)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_AccessSpecifierDecl___N_std_S_allocator__S0_ Specifiers;
[FieldOffset(560)]
internal byte isPOD;
[FieldOffset(561)]
internal byte isAbstract;
[FieldOffset(562)]
internal byte isUnion;
[FieldOffset(563)]
internal byte isDynamic;
[FieldOffset(564)]
internal byte isPolymorphic;
[FieldOffset(565)]
internal byte hasNonTrivialDefaultConstructor;
[FieldOffset(566)]
internal byte hasNonTrivialCopyConstructor;
[FieldOffset(567)]
internal byte hasNonTrivialDestructor;
[FieldOffset(568)]
internal byte isExternCContext;
[FieldOffset(569)]
internal byte isInjected;
[FieldOffset(576)]
internal global::System.IntPtr layout;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Class@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Class@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Class@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getBases@Class@AST@CppParser@CppSharp@@QEAAPEAUBaseClassSpecifier@234@I@Z")]
internal static extern global::System.IntPtr GetBases(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addBases@Class@AST@CppParser@CppSharp@@QEAAXAEAPEAUBaseClassSpecifier@234@@Z")]
internal static extern void AddBases(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearBases@Class@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearBases(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFields@Class@AST@CppParser@CppSharp@@QEAAPEAVField@234@I@Z")]
internal static extern global::System.IntPtr GetFields(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addFields@Class@AST@CppParser@CppSharp@@QEAAXAEAPEAVField@234@@Z")]
internal static extern void AddFields(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearFields@Class@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearFields(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getMethods@Class@AST@CppParser@CppSharp@@QEAAPEAVMethod@234@I@Z")]
internal static extern global::System.IntPtr GetMethods(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addMethods@Class@AST@CppParser@CppSharp@@QEAAXAEAPEAVMethod@234@@Z")]
internal static extern void AddMethods(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearMethods@Class@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearMethods(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecifiers@Class@AST@CppParser@CppSharp@@QEAAPEAVAccessSpecifierDecl@234@I@Z")]
internal static extern global::System.IntPtr GetSpecifiers(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSpecifiers@Class@AST@CppParser@CppSharp@@QEAAXAEAPEAVAccessSpecifierDecl@234@@Z")]
internal static extern void AddSpecifiers(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSpecifiers@Class@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSpecifiers(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getBasesCount@Class@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetBasesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getFieldsCount@Class@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetFieldsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getMethodsCount@Class@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetMethodsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecifiersCount@Class@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSpecifiersCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.Class __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Class(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Class __CreateInstance(global::CppSharp.Parser.AST.Class.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Class(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Class.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Class.__Internal));
global::CppSharp.Parser.AST.Class.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Class(global::CppSharp.Parser.AST.Class.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Class(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Class()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Class.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Class(global::CppSharp.Parser.AST.Class _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Class.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.BaseClassSpecifier GetBases(uint i)
{
var __ret = __Internal.GetBases((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.BaseClassSpecifier __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.BaseClassSpecifier.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.BaseClassSpecifier) global::CppSharp.Parser.AST.BaseClassSpecifier.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.BaseClassSpecifier.__CreateInstance(__ret);
return __result0;
}
public void AddBases(global::CppSharp.Parser.AST.BaseClassSpecifier s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddBases((__Instance + __PointerAdjustment), __arg0);
}
public void ClearBases()
{
__Internal.ClearBases((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Field GetFields(uint i)
{
var __ret = __Internal.GetFields((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Field __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Field.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Field) global::CppSharp.Parser.AST.Field.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Field.__CreateInstance(__ret);
return __result0;
}
public void AddFields(global::CppSharp.Parser.AST.Field s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddFields((__Instance + __PointerAdjustment), __arg0);
}
public void ClearFields()
{
__Internal.ClearFields((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.Method GetMethods(uint i)
{
var __ret = __Internal.GetMethods((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Method __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Method.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Method) global::CppSharp.Parser.AST.Method.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Method.__CreateInstance(__ret);
return __result0;
}
public void AddMethods(global::CppSharp.Parser.AST.Method s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddMethods((__Instance + __PointerAdjustment), __arg0);
}
public void ClearMethods()
{
__Internal.ClearMethods((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.AccessSpecifierDecl GetSpecifiers(uint i)
{
var __ret = __Internal.GetSpecifiers((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.AccessSpecifierDecl __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.AccessSpecifierDecl) global::CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(__ret);
return __result0;
}
public void AddSpecifiers(global::CppSharp.Parser.AST.AccessSpecifierDecl s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddSpecifiers((__Instance + __PointerAdjustment), __arg0);
}
public void ClearSpecifiers()
{
__Internal.ClearSpecifiers((__Instance + __PointerAdjustment));
}
public bool IsPOD
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isPOD != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isPOD = (byte) (value ? 1 : 0);
}
}
public bool IsAbstract
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isAbstract != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isAbstract = (byte) (value ? 1 : 0);
}
}
public bool IsUnion
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isUnion != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isUnion = (byte) (value ? 1 : 0);
}
}
public bool IsDynamic
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isDynamic != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isDynamic = (byte) (value ? 1 : 0);
}
}
public bool IsPolymorphic
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isPolymorphic != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isPolymorphic = (byte) (value ? 1 : 0);
}
}
public bool HasNonTrivialDefaultConstructor
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->hasNonTrivialDefaultConstructor != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->hasNonTrivialDefaultConstructor = (byte) (value ? 1 : 0);
}
}
public bool HasNonTrivialCopyConstructor
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->hasNonTrivialCopyConstructor != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->hasNonTrivialCopyConstructor = (byte) (value ? 1 : 0);
}
}
public bool HasNonTrivialDestructor
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->hasNonTrivialDestructor != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->hasNonTrivialDestructor = (byte) (value ? 1 : 0);
}
}
public bool IsExternCContext
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isExternCContext != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isExternCContext = (byte) (value ? 1 : 0);
}
}
public bool IsInjected
{
get
{
return ((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isInjected != 0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->isInjected = (byte) (value ? 1 : 0);
}
}
public global::CppSharp.Parser.AST.ClassLayout Layout
{
get
{
global::CppSharp.Parser.AST.ClassLayout __result0;
if (((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->layout == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ClassLayout.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->layout))
__result0 = (global::CppSharp.Parser.AST.ClassLayout) global::CppSharp.Parser.AST.ClassLayout.NativeToManagedMap[((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->layout];
else __result0 = global::CppSharp.Parser.AST.ClassLayout.__CreateInstance(((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->layout);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Class.__Internal*) __Instance)->layout = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint BasesCount
{
get
{
var __ret = __Internal.GetBasesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint FieldsCount
{
get
{
var __ret = __Internal.GetFieldsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint MethodsCount
{
get
{
var __ret = __Internal.GetMethodsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint SpecifiersCount
{
get
{
var __ret = __Internal.GetSpecifiersCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Template : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 256)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr TemplatedDecl;
[FieldOffset(232)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Template@AST@CppParser@CppSharp@@QEAA@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Template@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Template@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Template@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getParameters@Template@AST@CppParser@CppSharp@@QEAAPEAVDeclaration@234@I@Z")]
internal static extern global::System.IntPtr GetParameters(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addParameters@Template@AST@CppParser@CppSharp@@QEAAXAEAPEAVDeclaration@234@@Z")]
internal static extern void AddParameters(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearParameters@Template@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearParameters(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getParametersCount@Template@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetParametersCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.Template __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Template(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Template __CreateInstance(global::CppSharp.Parser.AST.Template.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Template(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Template.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Template.__Internal));
global::CppSharp.Parser.AST.Template.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Template(global::CppSharp.Parser.AST.Template.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Template(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Template(global::CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Template.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public Template()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Template.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Template(global::CppSharp.Parser.AST.Template _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Template.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Declaration GetParameters(uint i)
{
var __ret = __Internal.GetParameters((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.Declaration __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(__ret);
return __result0;
}
public void AddParameters(global::CppSharp.Parser.AST.Declaration s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddParameters((__Instance + __PointerAdjustment), __arg0);
}
public void ClearParameters()
{
__Internal.ClearParameters((__Instance + __PointerAdjustment));
}
public static implicit operator global::CppSharp.Parser.AST.Template(global::CppSharp.Parser.AST.DeclarationKind kind)
{
return new global::CppSharp.Parser.AST.Template(kind);
}
public global::CppSharp.Parser.AST.Declaration TemplatedDecl
{
get
{
global::CppSharp.Parser.AST.Declaration __result0;
if (((global::CppSharp.Parser.AST.Template.__Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Declaration.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.Template.__Internal*) __Instance)->TemplatedDecl))
__result0 = (global::CppSharp.Parser.AST.Declaration) global::CppSharp.Parser.AST.Declaration.NativeToManagedMap[((global::CppSharp.Parser.AST.Template.__Internal*) __Instance)->TemplatedDecl];
else __result0 = global::CppSharp.Parser.AST.Declaration.__CreateInstance(((global::CppSharp.Parser.AST.Template.__Internal*) __Instance)->TemplatedDecl);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.Template.__Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint ParametersCount
{
get
{
var __ret = __Internal.GetParametersCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class TypeAliasTemplate : global::CppSharp.Parser.AST.Template, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 256)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr TemplatedDecl;
[FieldOffset(232)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeAliasTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeAliasTemplate@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypeAliasTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TypeAliasTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeAliasTemplate(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypeAliasTemplate __CreateInstance(global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeAliasTemplate(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal));
global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAliasTemplate(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAliasTemplate()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeAliasTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
public unsafe partial class TemplateParameter : global::CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal uint depth;
[FieldOffset(228)]
internal uint index;
[FieldOffset(232)]
internal byte isParameterPack;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateParameter@AST@CppParser@CppSharp@@QEAA@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateParameter@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateParameter(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TemplateParameter __CreateInstance(global::CppSharp.Parser.AST.TemplateParameter.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateParameter(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TemplateParameter.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameter.__Internal));
global::CppSharp.Parser.AST.TemplateParameter.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TemplateParameter(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TemplateParameter(global::CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public static implicit operator global::CppSharp.Parser.AST.TemplateParameter(global::CppSharp.Parser.AST.DeclarationKind kind)
{
return new global::CppSharp.Parser.AST.TemplateParameter(kind);
}
public uint Depth
{
get
{
return ((global::CppSharp.Parser.AST.TemplateParameter.__Internal*) __Instance)->depth;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameter.__Internal*) __Instance)->depth = value;
}
}
public uint Index
{
get
{
return ((global::CppSharp.Parser.AST.TemplateParameter.__Internal*) __Instance)->index;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameter.__Internal*) __Instance)->index = value;
}
}
public bool IsParameterPack
{
get
{
return ((global::CppSharp.Parser.AST.TemplateParameter.__Internal*) __Instance)->isParameterPack != 0;
}
set
{
((global::CppSharp.Parser.AST.TemplateParameter.__Internal*) __Instance)->isParameterPack = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class TemplateTemplateParameter : global::CppSharp.Parser.AST.Template, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 264)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr TemplatedDecl;
[FieldOffset(232)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters;
[FieldOffset(256)]
internal byte isParameterPack;
[FieldOffset(257)]
internal byte isPackExpansion;
[FieldOffset(258)]
internal byte isExpandedParameterPack;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateTemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TemplateTemplateParameter@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TemplateTemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TemplateTemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateTemplateParameter(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TemplateTemplateParameter __CreateInstance(global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TemplateTemplateParameter(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal));
global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TemplateTemplateParameter(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TemplateTemplateParameter()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplateParameter _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public bool IsParameterPack
{
get
{
return ((global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal*) __Instance)->isParameterPack != 0;
}
set
{
((global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal*) __Instance)->isParameterPack = (byte) (value ? 1 : 0);
}
}
public bool IsPackExpansion
{
get
{
return ((global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal*) __Instance)->isPackExpansion != 0;
}
set
{
((global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal*) __Instance)->isPackExpansion = (byte) (value ? 1 : 0);
}
}
public bool IsExpandedParameterPack
{
get
{
return ((global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal*) __Instance)->isExpandedParameterPack != 0;
}
set
{
((global::CppSharp.Parser.AST.TemplateTemplateParameter.__Internal*) __Instance)->isExpandedParameterPack = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class TypeTemplateParameter : global::CppSharp.Parser.AST.TemplateParameter, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 256)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal uint depth;
[FieldOffset(228)]
internal uint index;
[FieldOffset(232)]
internal byte isParameterPack;
[FieldOffset(240)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal defaultArgument;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeTemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeTemplateParameter@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypeTemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TypeTemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeTemplateParameter(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TypeTemplateParameter __CreateInstance(global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TypeTemplateParameter(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal));
global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeTemplateParameter(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeTemplateParameter()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.QualifiedType DefaultArgument
{
get
{
return global::CppSharp.Parser.AST.QualifiedType.__CreateInstance(((global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal*) __Instance)->defaultArgument);
}
set
{
((global::CppSharp.Parser.AST.TypeTemplateParameter.__Internal*) __Instance)->defaultArgument = ReferenceEquals(value, null) ? new global::CppSharp.Parser.AST.QualifiedType.__Internal() : *(global::CppSharp.Parser.AST.QualifiedType.__Internal*) value.__Instance;
}
}
}
public unsafe partial class NonTypeTemplateParameter : global::CppSharp.Parser.AST.TemplateParameter, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 256)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal uint depth;
[FieldOffset(228)]
internal uint index;
[FieldOffset(232)]
internal byte isParameterPack;
[FieldOffset(240)]
internal global::System.IntPtr defaultArgument;
[FieldOffset(248)]
internal uint position;
[FieldOffset(252)]
internal byte isPackExpansion;
[FieldOffset(253)]
internal byte isExpandedParameterPack;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0NonTypeTemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0NonTypeTemplateParameter@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1NonTypeTemplateParameter@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.NonTypeTemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.NonTypeTemplateParameter(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.NonTypeTemplateParameter __CreateInstance(global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.NonTypeTemplateParameter(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal));
global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected NonTypeTemplateParameter(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public NonTypeTemplateParameter()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParameter _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.Expression DefaultArgument
{
get
{
global::CppSharp.Parser.AST.Expression __result0;
if (((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->defaultArgument == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Expression.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->defaultArgument))
__result0 = (global::CppSharp.Parser.AST.Expression) global::CppSharp.Parser.AST.Expression.NativeToManagedMap[((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->defaultArgument];
else __result0 = global::CppSharp.Parser.AST.Expression.__CreateInstance(((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->defaultArgument);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->defaultArgument = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint Position
{
get
{
return ((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->position;
}
set
{
((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->position = value;
}
}
public bool IsPackExpansion
{
get
{
return ((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->isPackExpansion != 0;
}
set
{
((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->isPackExpansion = (byte) (value ? 1 : 0);
}
}
public bool IsExpandedParameterPack
{
get
{
return ((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->isExpandedParameterPack != 0;
}
set
{
((global::CppSharp.Parser.AST.NonTypeTemplateParameter.__Internal*) __Instance)->isExpandedParameterPack = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ClassTemplate : global::CppSharp.Parser.AST.Template, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 280)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr TemplatedDecl;
[FieldOffset(232)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters;
[FieldOffset(256)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_ClassTemplateSpecialization___N_std_S_allocator__S0_ Specializations;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassTemplate@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ClassTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecializations@ClassTemplate@AST@CppParser@CppSharp@@QEAAPEAVClassTemplateSpecialization@234@I@Z")]
internal static extern global::System.IntPtr GetSpecializations(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSpecializations@ClassTemplate@AST@CppParser@CppSharp@@QEAAXAEAPEAVClassTemplateSpecialization@234@@Z")]
internal static extern void AddSpecializations(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSpecializations@ClassTemplate@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSpecializations(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindSpecialization@ClassTemplate@AST@CppParser@CppSharp@@QEAAPEAVClassTemplateSpecialization@234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindSpecialization(global::System.IntPtr instance, global::System.IntPtr usr);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindPartialSpecialization@ClassTemplate@AST@CppParser@CppSharp@@QEAAPEAVClassTemplatePartialSpecialization@234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindPartialSpecialization(global::System.IntPtr instance, global::System.IntPtr usr);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecializationsCount@ClassTemplate@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSpecializationsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.ClassTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassTemplate(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ClassTemplate __CreateInstance(global::CppSharp.Parser.AST.ClassTemplate.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassTemplate(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ClassTemplate.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplate.__Internal));
global::CppSharp.Parser.AST.ClassTemplate.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ClassTemplate(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ClassTemplate()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.ClassTemplateSpecialization GetSpecializations(uint i)
{
var __ret = __Internal.GetSpecializations((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.ClassTemplateSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ClassTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.ClassTemplateSpecialization) global::CppSharp.Parser.AST.ClassTemplateSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.ClassTemplateSpecialization.__CreateInstance(__ret);
return __result0;
}
public void AddSpecializations(global::CppSharp.Parser.AST.ClassTemplateSpecialization s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddSpecializations((__Instance + __PointerAdjustment), __arg0);
}
public void ClearSpecializations()
{
__Internal.ClearSpecializations((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.ClassTemplateSpecialization FindSpecialization(string usr)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(usr, __allocator0);
var __arg0 = __basicString0.__Instance;
var __ret = __Internal.FindSpecialization((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.ClassTemplateSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ClassTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.ClassTemplateSpecialization) global::CppSharp.Parser.AST.ClassTemplateSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.ClassTemplateSpecialization.__CreateInstance(__ret);
return __result0;
}
public global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization FindPartialSpecialization(string usr)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(usr, __allocator0);
var __arg0 = __basicString0.__Instance;
var __ret = __Internal.FindPartialSpecialization((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization) global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__CreateInstance(__ret);
return __result0;
}
public uint SpecializationsCount
{
get
{
var __ret = __Internal.GetSpecializationsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class ClassTemplateSpecialization : global::CppSharp.Parser.AST.Class, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 624)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_BaseClassSpecifier___N_std_S_allocator__S0_ Bases;
[FieldOffset(488)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Field___N_std_S_allocator__S0_ Fields;
[FieldOffset(512)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Method___N_std_S_allocator__S0_ Methods;
[FieldOffset(536)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_AccessSpecifierDecl___N_std_S_allocator__S0_ Specifiers;
[FieldOffset(560)]
internal byte isPOD;
[FieldOffset(561)]
internal byte isAbstract;
[FieldOffset(562)]
internal byte isUnion;
[FieldOffset(563)]
internal byte isDynamic;
[FieldOffset(564)]
internal byte isPolymorphic;
[FieldOffset(565)]
internal byte hasNonTrivialDefaultConstructor;
[FieldOffset(566)]
internal byte hasNonTrivialCopyConstructor;
[FieldOffset(567)]
internal byte hasNonTrivialDestructor;
[FieldOffset(568)]
internal byte isExternCContext;
[FieldOffset(569)]
internal byte isInjected;
[FieldOffset(576)]
internal global::System.IntPtr layout;
[FieldOffset(584)]
internal global::System.IntPtr templatedDecl;
[FieldOffset(592)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(616)]
internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAA?AUTemplateArgument@234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXAEAUTemplateArgument@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@ClassTemplateSpecialization@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassTemplateSpecialization(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ClassTemplateSpecialization __CreateInstance(global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassTemplateSpecialization(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal));
global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ClassTemplateSpecialization(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ClassTemplateSpecialization()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TemplateArgument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.TemplateArgument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.TemplateArgument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.ClassTemplate TemplatedDecl
{
get
{
global::CppSharp.Parser.AST.ClassTemplate __result0;
if (((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->templatedDecl == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ClassTemplate.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->templatedDecl))
__result0 = (global::CppSharp.Parser.AST.ClassTemplate) global::CppSharp.Parser.AST.ClassTemplate.NativeToManagedMap[((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->templatedDecl];
else __result0 = global::CppSharp.Parser.AST.ClassTemplate.__CreateInstance(((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->templatedDecl);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->templatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
{
get
{
return ((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->specializationKind;
}
set
{
((global::CppSharp.Parser.AST.ClassTemplateSpecialization.__Internal*) __Instance)->specializationKind = value;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 624)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_BaseClassSpecifier___N_std_S_allocator__S0_ Bases;
[FieldOffset(488)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Field___N_std_S_allocator__S0_ Fields;
[FieldOffset(512)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Method___N_std_S_allocator__S0_ Methods;
[FieldOffset(536)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_AccessSpecifierDecl___N_std_S_allocator__S0_ Specifiers;
[FieldOffset(560)]
internal byte isPOD;
[FieldOffset(561)]
internal byte isAbstract;
[FieldOffset(562)]
internal byte isUnion;
[FieldOffset(563)]
internal byte isDynamic;
[FieldOffset(564)]
internal byte isPolymorphic;
[FieldOffset(565)]
internal byte hasNonTrivialDefaultConstructor;
[FieldOffset(566)]
internal byte hasNonTrivialCopyConstructor;
[FieldOffset(567)]
internal byte hasNonTrivialDestructor;
[FieldOffset(568)]
internal byte isExternCContext;
[FieldOffset(569)]
internal byte isInjected;
[FieldOffset(576)]
internal global::System.IntPtr layout;
[FieldOffset(584)]
internal global::System.IntPtr templatedDecl;
[FieldOffset(592)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(616)]
internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization __CreateInstance(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal));
global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ClassTemplatePartialSpecialization(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ClassTemplatePartialSpecialization()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ClassTemplatePartialSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 280)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr TemplatedDecl;
[FieldOffset(232)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters;
[FieldOffset(256)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_FunctionTemplateSpecialization___N_std_S_allocator__S0_ Specializations;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FunctionTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FunctionTemplate@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1FunctionTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecializations@FunctionTemplate@AST@CppParser@CppSharp@@QEAAPEAVFunctionTemplateSpecialization@234@I@Z")]
internal static extern global::System.IntPtr GetSpecializations(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSpecializations@FunctionTemplate@AST@CppParser@CppSharp@@QEAAXAEAPEAVFunctionTemplateSpecialization@234@@Z")]
internal static extern void AddSpecializations(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSpecializations@FunctionTemplate@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSpecializations(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindSpecialization@FunctionTemplate@AST@CppParser@CppSharp@@QEAAPEAVFunctionTemplateSpecialization@234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindSpecialization(global::System.IntPtr instance, global::System.IntPtr usr);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecializationsCount@FunctionTemplate@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSpecializationsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.FunctionTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FunctionTemplate(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.FunctionTemplate __CreateInstance(global::CppSharp.Parser.AST.FunctionTemplate.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FunctionTemplate(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.FunctionTemplate.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionTemplate.__Internal));
global::CppSharp.Parser.AST.FunctionTemplate.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected FunctionTemplate(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public FunctionTemplate()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.FunctionTemplateSpecialization GetSpecializations(uint i)
{
var __ret = __Internal.GetSpecializations((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.FunctionTemplateSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.FunctionTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.FunctionTemplateSpecialization) global::CppSharp.Parser.AST.FunctionTemplateSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__CreateInstance(__ret);
return __result0;
}
public void AddSpecializations(global::CppSharp.Parser.AST.FunctionTemplateSpecialization s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddSpecializations((__Instance + __PointerAdjustment), __arg0);
}
public void ClearSpecializations()
{
__Internal.ClearSpecializations((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.FunctionTemplateSpecialization FindSpecialization(string usr)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(usr, __allocator0);
var __arg0 = __basicString0.__Instance;
var __ret = __Internal.FindSpecialization((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.FunctionTemplateSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.FunctionTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.FunctionTemplateSpecialization) global::CppSharp.Parser.AST.FunctionTemplateSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__CreateInstance(__ret);
return __result0;
}
public uint SpecializationsCount
{
get
{
var __ret = __Internal.GetSpecializationsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class FunctionTemplateSpecialization : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::System.IntPtr _template;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(32)]
internal global::System.IntPtr specializedFunction;
[FieldOffset(40)]
internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAA?AUTemplateArgument@234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXAEAUTemplateArgument@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@FunctionTemplateSpecialization@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.FunctionTemplateSpecialization> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.FunctionTemplateSpecialization>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FunctionTemplateSpecialization(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.FunctionTemplateSpecialization __CreateInstance(global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FunctionTemplateSpecialization(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal));
global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected FunctionTemplateSpecialization(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public FunctionTemplateSpecialization()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTemplateSpecialization _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.FunctionTemplateSpecialization __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TemplateArgument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.TemplateArgument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.TemplateArgument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.FunctionTemplate Template
{
get
{
global::CppSharp.Parser.AST.FunctionTemplate __result0;
if (((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->_template == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.FunctionTemplate.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->_template))
__result0 = (global::CppSharp.Parser.AST.FunctionTemplate) global::CppSharp.Parser.AST.FunctionTemplate.NativeToManagedMap[((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->_template];
else __result0 = global::CppSharp.Parser.AST.FunctionTemplate.__CreateInstance(((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->_template);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->_template = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.Function SpecializedFunction
{
get
{
global::CppSharp.Parser.AST.Function __result0;
if (((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializedFunction == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.Function.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializedFunction))
__result0 = (global::CppSharp.Parser.AST.Function) global::CppSharp.Parser.AST.Function.NativeToManagedMap[((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializedFunction];
else __result0 = global::CppSharp.Parser.AST.Function.__CreateInstance(((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializedFunction);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializedFunction = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
{
get
{
return ((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializationKind;
}
set
{
((global::CppSharp.Parser.AST.FunctionTemplateSpecialization.__Internal*) __Instance)->specializationKind = value;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 280)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::System.IntPtr TemplatedDecl;
[FieldOffset(232)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters;
[FieldOffset(256)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_VarTemplateSpecialization___N_std_S_allocator__S0_ Specializations;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VarTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VarTemplate@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VarTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecializations@VarTemplate@AST@CppParser@CppSharp@@QEAAPEAVVarTemplateSpecialization@234@I@Z")]
internal static extern global::System.IntPtr GetSpecializations(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSpecializations@VarTemplate@AST@CppParser@CppSharp@@QEAAXAEAPEAVVarTemplateSpecialization@234@@Z")]
internal static extern void AddSpecializations(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSpecializations@VarTemplate@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSpecializations(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindSpecialization@VarTemplate@AST@CppParser@CppSharp@@QEAAPEAVVarTemplateSpecialization@234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindSpecialization(global::System.IntPtr instance, global::System.IntPtr usr);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindPartialSpecialization@VarTemplate@AST@CppParser@CppSharp@@QEAAPEAVVarTemplatePartialSpecialization@234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindPartialSpecialization(global::System.IntPtr instance, global::System.IntPtr usr);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSpecializationsCount@VarTemplate@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSpecializationsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VarTemplate(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VarTemplate __CreateInstance(global::CppSharp.Parser.AST.VarTemplate.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VarTemplate(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VarTemplate.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplate.__Internal));
global::CppSharp.Parser.AST.VarTemplate.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VarTemplate(global::CppSharp.Parser.AST.VarTemplate.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VarTemplate(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VarTemplate()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplate.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.VarTemplateSpecialization GetSpecializations(uint i)
{
var __ret = __Internal.GetSpecializations((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
return __result0;
}
public void AddSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddSpecializations((__Instance + __PointerAdjustment), __arg0);
}
public void ClearSpecializations()
{
__Internal.ClearSpecializations((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.VarTemplateSpecialization FindSpecialization(string usr)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(usr, __allocator0);
var __arg0 = __basicString0.__Instance;
var __ret = __Internal.FindSpecialization((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
return __result0;
}
public global::CppSharp.Parser.AST.VarTemplatePartialSpecialization FindPartialSpecialization(string usr)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(usr, __allocator0);
var __arg0 = __basicString0.__Instance;
var __ret = __Internal.FindPartialSpecialization((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.VarTemplatePartialSpecialization __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.VarTemplatePartialSpecialization) global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__CreateInstance(__ret);
return __result0;
}
public uint SpecializationsCount
{
get
{
var __ret = __Internal.GetSpecializationsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 312)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C mangled;
[FieldOffset(256)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(272)]
internal global::System.IntPtr templatedDecl;
[FieldOffset(280)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(304)]
internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA?AUTemplateArgument@234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXAEAUTemplateArgument@234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VarTemplateSpecialization(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VarTemplateSpecialization __CreateInstance(global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VarTemplateSpecialization(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal));
global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VarTemplateSpecialization(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VarTemplateSpecialization()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TemplateArgument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.TemplateArgument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.TemplateArgument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
{
get
{
global::CppSharp.Parser.AST.VarTemplate __result0;
if (((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->templatedDecl == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->templatedDecl))
__result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->templatedDecl];
else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->templatedDecl);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->templatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
{
get
{
return ((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->specializationKind;
}
set
{
((global::CppSharp.Parser.AST.VarTemplateSpecialization.__Internal*) __Instance)->specializationKind = value;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 312)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C mangled;
[FieldOffset(256)]
internal global::CppSharp.Parser.AST.QualifiedType.__Internal qualifiedType;
[FieldOffset(272)]
internal global::System.IntPtr templatedDecl;
[FieldOffset(280)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(304)]
internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VarTemplatePartialSpecialization __CreateInstance(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VarTemplatePartialSpecialization(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal));
global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VarTemplatePartialSpecialization()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 472)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal byte isInline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Namespace@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Namespace@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Namespace@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.Namespace __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Namespace(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Namespace __CreateInstance(global::CppSharp.Parser.AST.Namespace.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Namespace(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Namespace.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Namespace.__Internal));
global::CppSharp.Parser.AST.Namespace.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Namespace(global::CppSharp.Parser.AST.Namespace.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Namespace(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Namespace()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Namespace.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Namespace(global::CppSharp.Parser.AST.Namespace _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Namespace.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public bool IsInline
{
get
{
return ((global::CppSharp.Parser.AST.Namespace.__Internal*) __Instance)->isInline != 0;
}
set
{
((global::CppSharp.Parser.AST.Namespace.__Internal*) __Instance)->isInline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class PreprocessedEntity : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.MacroLocation macroLocation;
[FieldOffset(8)]
internal global::System.IntPtr originalPtr;
[FieldOffset(16)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0PreprocessedEntity@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0PreprocessedEntity@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.PreprocessedEntity> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.PreprocessedEntity>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.PreprocessedEntity(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.PreprocessedEntity __CreateInstance(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.PreprocessedEntity(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal));
*(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) ret = native;
return ret.ToPointer();
}
private PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected PreprocessedEntity(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public PreprocessedEntity()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.PreprocessedEntity.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.PreprocessedEntity __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.MacroLocation MacroLocation
{
get
{
return ((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance)->macroLocation;
}
set
{
((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance)->macroLocation = value;
}
}
public global::System.IntPtr OriginalPtr
{
get
{
return ((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance)->originalPtr;
}
set
{
((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance)->originalPtr = (global::System.IntPtr) value;
}
}
public global::CppSharp.Parser.AST.DeclarationKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.PreprocessedEntity.__Internal*) __Instance)->kind = value;
}
}
}
public unsafe partial class MacroDefinition : global::CppSharp.Parser.AST.PreprocessedEntity, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 96)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.MacroLocation macroLocation;
[FieldOffset(8)]
internal global::System.IntPtr originalPtr;
[FieldOffset(16)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(24)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(56)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C expression;
[FieldOffset(88)]
internal int lineNumberStart;
[FieldOffset(92)]
internal int lineNumberEnd;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0MacroDefinition@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0MacroDefinition@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1MacroDefinition@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.MacroDefinition __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.MacroDefinition(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.MacroDefinition __CreateInstance(global::CppSharp.Parser.AST.MacroDefinition.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.MacroDefinition(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.MacroDefinition.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MacroDefinition.__Internal));
global::CppSharp.Parser.AST.MacroDefinition.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected MacroDefinition(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public MacroDefinition()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MacroDefinition.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MacroDefinition.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.PreprocessedEntity __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Name
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->name);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->name = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string Expression
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->expression);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->expression = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public int LineNumberStart
{
get
{
return ((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->lineNumberStart;
}
set
{
((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->lineNumberStart = value;
}
}
public int LineNumberEnd
{
get
{
return ((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->lineNumberEnd;
}
set
{
((global::CppSharp.Parser.AST.MacroDefinition.__Internal*) __Instance)->lineNumberEnd = value;
}
}
}
public unsafe partial class MacroExpansion : global::CppSharp.Parser.AST.PreprocessedEntity, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 96)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.MacroLocation macroLocation;
[FieldOffset(8)]
internal global::System.IntPtr originalPtr;
[FieldOffset(16)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(24)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(56)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[FieldOffset(88)]
internal global::System.IntPtr definition;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0MacroExpansion@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0MacroExpansion@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1MacroExpansion@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.MacroExpansion __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.MacroExpansion(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.MacroExpansion __CreateInstance(global::CppSharp.Parser.AST.MacroExpansion.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.MacroExpansion(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.MacroExpansion.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MacroExpansion.__Internal));
global::CppSharp.Parser.AST.MacroExpansion.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected MacroExpansion(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public MacroExpansion()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MacroExpansion.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.MacroExpansion.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.PreprocessedEntity __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Name
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->name);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->name = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.MacroDefinition Definition
{
get
{
global::CppSharp.Parser.AST.MacroDefinition __result0;
if (((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->definition == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.MacroDefinition.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->definition))
__result0 = (global::CppSharp.Parser.AST.MacroDefinition) global::CppSharp.Parser.AST.MacroDefinition.NativeToManagedMap[((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->definition];
else __result0 = global::CppSharp.Parser.AST.MacroDefinition.__CreateInstance(((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->definition);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.MacroExpansion.__Internal*) __Instance)->definition = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class TranslationUnit : global::CppSharp.Parser.AST.Namespace, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 536)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.DeclarationKind kind;
[FieldOffset(4)]
internal int maxFieldAlignment;
[FieldOffset(8)]
internal global::CppSharp.Parser.AST.AccessSpecifier access;
[FieldOffset(16)]
internal global::System.IntPtr _namespace;
[FieldOffset(24)]
internal global::CppSharp.Parser.SourceLocation.__Internal location;
[FieldOffset(28)]
internal int lineNumberStart;
[FieldOffset(32)]
internal int lineNumberEnd;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(72)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C USR;
[FieldOffset(104)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C debugText;
[FieldOffset(136)]
internal byte isIncomplete;
[FieldOffset(137)]
internal byte isDependent;
[FieldOffset(138)]
internal byte isImplicit;
[FieldOffset(139)]
internal byte isInvalid;
[FieldOffset(144)]
internal global::System.IntPtr completeDeclaration;
[FieldOffset(152)]
internal uint definitionOrder;
[FieldOffset(160)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_ PreprocessedEntities;
[FieldOffset(184)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Redeclarations;
[FieldOffset(208)]
internal global::System.IntPtr originalPtr;
[FieldOffset(216)]
internal global::System.IntPtr comment;
[FieldOffset(224)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_ Namespaces;
[FieldOffset(248)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_ Enums;
[FieldOffset(272)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_ Functions;
[FieldOffset(296)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_ Classes;
[FieldOffset(320)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_ Templates;
[FieldOffset(344)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_ Typedefs;
[FieldOffset(368)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_ TypeAliases;
[FieldOffset(392)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_ Variables;
[FieldOffset(416)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_ Friends;
[FieldOffset(440)]
internal global::Std.Map.__Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_ anonymous;
[FieldOffset(456)]
internal byte isAnonymous;
[FieldOffset(464)]
internal byte isInline;
[FieldOffset(472)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C fileName;
[FieldOffset(504)]
internal byte isSystemHeader;
[FieldOffset(512)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_MacroDefinition___N_std_S_allocator__S0_ Macros;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TranslationUnit@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TranslationUnit@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TranslationUnit@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getMacros@TranslationUnit@AST@CppParser@CppSharp@@QEAAPEAVMacroDefinition@234@I@Z")]
internal static extern global::System.IntPtr GetMacros(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addMacros@TranslationUnit@AST@CppParser@CppSharp@@QEAAXAEAPEAVMacroDefinition@234@@Z")]
internal static extern void AddMacros(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearMacros@TranslationUnit@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearMacros(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getMacrosCount@TranslationUnit@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetMacrosCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.TranslationUnit __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TranslationUnit(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TranslationUnit __CreateInstance(global::CppSharp.Parser.AST.TranslationUnit.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TranslationUnit(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TranslationUnit.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TranslationUnit.__Internal));
global::CppSharp.Parser.AST.TranslationUnit.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TranslationUnit(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TranslationUnit()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TranslationUnit.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TranslationUnit.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.MacroDefinition GetMacros(uint i)
{
var __ret = __Internal.GetMacros((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.MacroDefinition __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.MacroDefinition.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.MacroDefinition) global::CppSharp.Parser.AST.MacroDefinition.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.MacroDefinition.__CreateInstance(__ret);
return __result0;
}
public void AddMacros(global::CppSharp.Parser.AST.MacroDefinition s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddMacros((__Instance + __PointerAdjustment), __arg0);
}
public void ClearMacros()
{
__Internal.ClearMacros((__Instance + __PointerAdjustment));
}
public string FileName
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.TranslationUnit.__Internal*) __Instance)->fileName);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.TranslationUnit.__Internal*) __Instance)->fileName = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public bool IsSystemHeader
{
get
{
return ((global::CppSharp.Parser.AST.TranslationUnit.__Internal*) __Instance)->isSystemHeader != 0;
}
set
{
((global::CppSharp.Parser.AST.TranslationUnit.__Internal*) __Instance)->isSystemHeader = (byte) (value ? 1 : 0);
}
}
public uint MacrosCount
{
get
{
var __ret = __Internal.GetMacrosCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class NativeLibrary : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 88)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C fileName;
[FieldOffset(32)]
internal global::CppSharp.Parser.AST.ArchType archType;
[FieldOffset(40)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ Symbols;
[FieldOffset(64)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ Dependencies;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0NativeLibrary@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0NativeLibrary@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1NativeLibrary@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSymbols@NativeLibrary@AST@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetSymbols(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSymbols@NativeLibrary@AST@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddSymbols(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSymbols@NativeLibrary@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSymbols(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getDependencies@NativeLibrary@AST@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetDependencies(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addDependencies@NativeLibrary@AST@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddDependencies(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearDependencies@NativeLibrary@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearDependencies(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSymbolsCount@NativeLibrary@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSymbolsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getDependenciesCount@NativeLibrary@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetDependenciesCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.NativeLibrary> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.NativeLibrary>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.NativeLibrary __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.NativeLibrary(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.NativeLibrary __CreateInstance(global::CppSharp.Parser.AST.NativeLibrary.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.NativeLibrary(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.NativeLibrary.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.NativeLibrary.__Internal));
global::CppSharp.Parser.AST.NativeLibrary.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected NativeLibrary(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public NativeLibrary()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.NativeLibrary.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.NativeLibrary.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.NativeLibrary __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string GetSymbols(uint i)
{
var __ret = __Internal.GetSymbols((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddSymbols(string s)
{
__Internal.AddSymbols((__Instance + __PointerAdjustment), s);
}
public void ClearSymbols()
{
__Internal.ClearSymbols((__Instance + __PointerAdjustment));
}
public string GetDependencies(uint i)
{
var __ret = __Internal.GetDependencies((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddDependencies(string s)
{
__Internal.AddDependencies((__Instance + __PointerAdjustment), s);
}
public void ClearDependencies()
{
__Internal.ClearDependencies((__Instance + __PointerAdjustment));
}
public string FileName
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.NativeLibrary.__Internal*) __Instance)->fileName);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.NativeLibrary.__Internal*) __Instance)->fileName = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.ArchType ArchType
{
get
{
return ((global::CppSharp.Parser.AST.NativeLibrary.__Internal*) __Instance)->archType;
}
set
{
((global::CppSharp.Parser.AST.NativeLibrary.__Internal*) __Instance)->archType = value;
}
}
public uint SymbolsCount
{
get
{
var __ret = __Internal.GetSymbolsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint DependenciesCount
{
get
{
var __ret = __Internal.GetDependenciesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class ASTContext : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TranslationUnit___N_std_S_allocator__S0_ TranslationUnits;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ASTContext@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ASTContext@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ASTContext@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?FindOrCreateModule@ASTContext@AST@CppParser@CppSharp@@QEAAPEAVTranslationUnit@234@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z")]
internal static extern global::System.IntPtr FindOrCreateModule(global::System.IntPtr instance, global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C File);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTranslationUnits@ASTContext@AST@CppParser@CppSharp@@QEAAPEAVTranslationUnit@234@I@Z")]
internal static extern global::System.IntPtr GetTranslationUnits(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addTranslationUnits@ASTContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVTranslationUnit@234@@Z")]
internal static extern void AddTranslationUnits(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearTranslationUnits@ASTContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearTranslationUnits(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTranslationUnitsCount@ASTContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetTranslationUnitsCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.ASTContext> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.ASTContext>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.ASTContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ASTContext(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ASTContext __CreateInstance(global::CppSharp.Parser.AST.ASTContext.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ASTContext(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ASTContext.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ASTContext.__Internal));
global::CppSharp.Parser.AST.ASTContext.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ASTContext(global::CppSharp.Parser.AST.ASTContext.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ASTContext(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ASTContext()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ASTContext.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ASTContext(global::CppSharp.Parser.AST.ASTContext _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ASTContext.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.ASTContext __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.TranslationUnit FindOrCreateModule(string File)
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(File, __allocator0);
var __arg0 = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
var __ret = __Internal.FindOrCreateModule((__Instance + __PointerAdjustment), __arg0);
__basicString0.Dispose(false);
__allocator0.Dispose();
global::CppSharp.Parser.AST.TranslationUnit __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TranslationUnit.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.TranslationUnit) global::CppSharp.Parser.AST.TranslationUnit.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.TranslationUnit.__CreateInstance(__ret);
return __result0;
}
public global::CppSharp.Parser.AST.TranslationUnit GetTranslationUnits(uint i)
{
var __ret = __Internal.GetTranslationUnits((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.TranslationUnit __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.TranslationUnit.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.TranslationUnit) global::CppSharp.Parser.AST.TranslationUnit.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.TranslationUnit.__CreateInstance(__ret);
return __result0;
}
public void AddTranslationUnits(global::CppSharp.Parser.AST.TranslationUnit s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddTranslationUnits((__Instance + __PointerAdjustment), __arg0);
}
public void ClearTranslationUnits()
{
__Internal.ClearTranslationUnits((__Instance + __PointerAdjustment));
}
public uint TranslationUnitsCount
{
get
{
var __ret = __Internal.GetTranslationUnitsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class Comment : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Comment@AST@CppParser@CppSharp@@QEAA@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.CommentKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Comment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Comment> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.Comment>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.Comment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Comment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.Comment __CreateInstance(global::CppSharp.Parser.AST.Comment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.Comment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.Comment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Comment.__Internal));
*(global::CppSharp.Parser.AST.Comment.__Internal*) ret = native;
return ret.ToPointer();
}
private Comment(global::CppSharp.Parser.AST.Comment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Comment(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Comment(global::CppSharp.Parser.AST.CommentKind kind)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Comment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), kind);
}
public Comment(global::CppSharp.Parser.AST.Comment _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.Comment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.Comment.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.Comment.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public static implicit operator global::CppSharp.Parser.AST.Comment(global::CppSharp.Parser.AST.CommentKind kind)
{
return new global::CppSharp.Parser.AST.Comment(kind);
}
public global::CppSharp.Parser.AST.CommentKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.Comment.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.Comment.__Internal*) __Instance)->kind = value;
}
}
}
public unsafe partial class BlockContentComment : global::CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BlockContentComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BlockContentComment@AST@CppParser@CppSharp@@QEAA@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.CommentKind Kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BlockContentComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.BlockContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BlockContentComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.BlockContentComment __CreateInstance(global::CppSharp.Parser.AST.BlockContentComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BlockContentComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.BlockContentComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockContentComment.__Internal));
*(global::CppSharp.Parser.AST.BlockContentComment.__Internal*) ret = native;
return ret.ToPointer();
}
private BlockContentComment(global::CppSharp.Parser.AST.BlockContentComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected BlockContentComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public BlockContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockContentComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public BlockContentComment(global::CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockContentComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), Kind);
}
public BlockContentComment(global::CppSharp.Parser.AST.BlockContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockContentComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.BlockContentComment.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.BlockContentComment.__Internal*) _0.__Instance);
}
public static implicit operator global::CppSharp.Parser.AST.BlockContentComment(global::CppSharp.Parser.AST.CommentKind Kind)
{
return new global::CppSharp.Parser.AST.BlockContentComment(Kind);
}
}
public unsafe partial class FullComment : global::CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_BlockContentComment___N_std_S_allocator__S0_ Blocks;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FullComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0FullComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1FullComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getBlocks@FullComment@AST@CppParser@CppSharp@@QEAAPEAVBlockContentComment@234@I@Z")]
internal static extern global::System.IntPtr GetBlocks(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addBlocks@FullComment@AST@CppParser@CppSharp@@QEAAXAEAPEAVBlockContentComment@234@@Z")]
internal static extern void AddBlocks(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearBlocks@FullComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearBlocks(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getBlocksCount@FullComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetBlocksCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.FullComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FullComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.FullComment __CreateInstance(global::CppSharp.Parser.AST.FullComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.FullComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.FullComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FullComment.__Internal));
global::CppSharp.Parser.AST.FullComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private FullComment(global::CppSharp.Parser.AST.FullComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected FullComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public FullComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FullComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public FullComment(global::CppSharp.Parser.AST.FullComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.FullComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.BlockContentComment GetBlocks(uint i)
{
var __ret = __Internal.GetBlocks((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.BlockContentComment __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.BlockContentComment.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.BlockContentComment) global::CppSharp.Parser.AST.BlockContentComment.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.BlockContentComment.__CreateInstance(__ret);
return __result0;
}
public void AddBlocks(global::CppSharp.Parser.AST.BlockContentComment s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddBlocks((__Instance + __PointerAdjustment), __arg0);
}
public void ClearBlocks()
{
__Internal.ClearBlocks((__Instance + __PointerAdjustment));
}
public uint BlocksCount
{
get
{
var __ret = __Internal.GetBlocksCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class InlineContentComment : global::CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte hasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QEAA@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.CommentKind Kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InlineContentComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.InlineContentComment __CreateInstance(global::CppSharp.Parser.AST.InlineContentComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InlineContentComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.InlineContentComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineContentComment.__Internal));
*(global::CppSharp.Parser.AST.InlineContentComment.__Internal*) ret = native;
return ret.ToPointer();
}
private InlineContentComment(global::CppSharp.Parser.AST.InlineContentComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected InlineContentComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineContentComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public InlineContentComment(global::CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineContentComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), Kind);
}
public InlineContentComment(global::CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineContentComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.InlineContentComment.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.InlineContentComment.__Internal*) _0.__Instance);
}
public static implicit operator global::CppSharp.Parser.AST.InlineContentComment(global::CppSharp.Parser.AST.CommentKind Kind)
{
return new global::CppSharp.Parser.AST.InlineContentComment(Kind);
}
public bool HasTrailingNewline
{
get
{
return ((global::CppSharp.Parser.AST.InlineContentComment.__Internal*) __Instance)->hasTrailingNewline != 0;
}
set
{
((global::CppSharp.Parser.AST.InlineContentComment.__Internal*) __Instance)->hasTrailingNewline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ParagraphComment : global::CppSharp.Parser.AST.BlockContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte isWhitespace;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_InlineContentComment___N_std_S_allocator__S0_ Content;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParagraphComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParagraphComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ParagraphComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getContent@ParagraphComment@AST@CppParser@CppSharp@@QEAAPEAVInlineContentComment@234@I@Z")]
internal static extern global::System.IntPtr GetContent(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addContent@ParagraphComment@AST@CppParser@CppSharp@@QEAAXAEAPEAVInlineContentComment@234@@Z")]
internal static extern void AddContent(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearContent@ParagraphComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearContent(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getContentCount@ParagraphComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetContentCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ParagraphComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ParagraphComment __CreateInstance(global::CppSharp.Parser.AST.ParagraphComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ParagraphComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ParagraphComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ParagraphComment.__Internal));
global::CppSharp.Parser.AST.ParagraphComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParagraphComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParagraphComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ParagraphComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ParagraphComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.InlineContentComment GetContent(uint i)
{
var __ret = __Internal.GetContent((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.InlineContentComment __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.InlineContentComment.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.InlineContentComment) global::CppSharp.Parser.AST.InlineContentComment.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.InlineContentComment.__CreateInstance(__ret);
return __result0;
}
public void AddContent(global::CppSharp.Parser.AST.InlineContentComment s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddContent((__Instance + __PointerAdjustment), __arg0);
}
public void ClearContent()
{
__Internal.ClearContent((__Instance + __PointerAdjustment));
}
public bool IsWhitespace
{
get
{
return ((global::CppSharp.Parser.AST.ParagraphComment.__Internal*) __Instance)->isWhitespace != 0;
}
set
{
((global::CppSharp.Parser.AST.ParagraphComment.__Internal*) __Instance)->isWhitespace = (byte) (value ? 1 : 0);
}
}
public uint ContentCount
{
get
{
var __ret = __Internal.GetContentCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class BlockCommandComment : global::CppSharp.Parser.AST.BlockContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal uint commandId;
[FieldOffset(8)]
internal global::System.IntPtr paragraphComment;
[FieldOffset(16)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_ Arguments;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BlockCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BlockCommandComment@AST@CppParser@CppSharp@@QEAA@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.CommentKind Kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0BlockCommandComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1BlockCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@BlockCommandComment@AST@CppParser@CppSharp@@QEAA?AVArgument@1234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@BlockCommandComment@AST@CppParser@CppSharp@@QEAAXAEAVArgument@1234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@BlockCommandComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@BlockCommandComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
public unsafe partial class Argument : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Argument@BlockCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Argument@BlockCommandComment@AST@CppParser@CppSharp@@QEAA@AEBV01234@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Argument@BlockCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.BlockCommandComment.Argument> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.BlockCommandComment.Argument>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.BlockCommandComment.Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BlockCommandComment.Argument(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.BlockCommandComment.Argument __CreateInstance(global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BlockCommandComment.Argument(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal));
global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Argument(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Argument()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.BlockCommandComment.Argument __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
internal static new global::CppSharp.Parser.AST.BlockCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BlockCommandComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.BlockCommandComment __CreateInstance(global::CppSharp.Parser.AST.BlockCommandComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.BlockCommandComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.BlockCommandComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.__Internal));
global::CppSharp.Parser.AST.BlockCommandComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected BlockCommandComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public BlockCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public BlockCommandComment(global::CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), Kind);
}
public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.BlockCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.BlockCommandComment.Argument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.BlockCommandComment.Argument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.BlockCommandComment.Argument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.BlockCommandComment.Argument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public static implicit operator global::CppSharp.Parser.AST.BlockCommandComment(global::CppSharp.Parser.AST.CommentKind Kind)
{
return new global::CppSharp.Parser.AST.BlockCommandComment(Kind);
}
public uint CommandId
{
get
{
return ((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->commandId;
}
set
{
((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->commandId = value;
}
}
public global::CppSharp.Parser.AST.ParagraphComment ParagraphComment
{
get
{
global::CppSharp.Parser.AST.ParagraphComment __result0;
if (((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->paragraphComment == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ParagraphComment.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->paragraphComment))
__result0 = (global::CppSharp.Parser.AST.ParagraphComment) global::CppSharp.Parser.AST.ParagraphComment.NativeToManagedMap[((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->paragraphComment];
else __result0 = global::CppSharp.Parser.AST.ParagraphComment.__CreateInstance(((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->paragraphComment);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.BlockCommandComment.__Internal*) __Instance)->paragraphComment = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class ParamCommandComment : global::CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal uint commandId;
[FieldOffset(8)]
internal global::System.IntPtr paragraphComment;
[FieldOffset(16)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(40)]
internal global::CppSharp.Parser.AST.ParamCommandComment.PassDirection direction;
[FieldOffset(44)]
internal uint paramIndex;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParamCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParamCommandComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ParamCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public enum PassDirection
{
In = 0,
Out = 1,
InOut = 2
}
internal static new global::CppSharp.Parser.AST.ParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ParamCommandComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.ParamCommandComment __CreateInstance(global::CppSharp.Parser.AST.ParamCommandComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.ParamCommandComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.ParamCommandComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ParamCommandComment.__Internal));
global::CppSharp.Parser.AST.ParamCommandComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParamCommandComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParamCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ParamCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.ParamCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.ParamCommandComment.PassDirection Direction
{
get
{
return ((global::CppSharp.Parser.AST.ParamCommandComment.__Internal*) __Instance)->direction;
}
set
{
((global::CppSharp.Parser.AST.ParamCommandComment.__Internal*) __Instance)->direction = value;
}
}
public uint ParamIndex
{
get
{
return ((global::CppSharp.Parser.AST.ParamCommandComment.__Internal*) __Instance)->paramIndex;
}
set
{
((global::CppSharp.Parser.AST.ParamCommandComment.__Internal*) __Instance)->paramIndex = value;
}
}
}
public unsafe partial class TParamCommandComment : global::CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 64)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal uint commandId;
[FieldOffset(8)]
internal global::System.IntPtr paragraphComment;
[FieldOffset(16)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(40)]
internal global::Std.Vector.__Internalc__N_std_S_vector__i___N_std_S_allocator__i Position;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TParamCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TParamCommandComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TParamCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getPosition@TParamCommandComment@AST@CppParser@CppSharp@@QEAAII@Z")]
internal static extern uint GetPosition(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addPosition@TParamCommandComment@AST@CppParser@CppSharp@@QEAAXAEAI@Z")]
internal static extern void AddPosition(global::System.IntPtr instance, uint* s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearPosition@TParamCommandComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearPosition(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getPositionCount@TParamCommandComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetPositionCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.TParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TParamCommandComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TParamCommandComment __CreateInstance(global::CppSharp.Parser.AST.TParamCommandComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TParamCommandComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TParamCommandComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TParamCommandComment.__Internal));
global::CppSharp.Parser.AST.TParamCommandComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TParamCommandComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TParamCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TParamCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TParamCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public uint GetPosition(uint i)
{
var __ret = __Internal.GetPosition((__Instance + __PointerAdjustment), i);
return __ret;
}
public void AddPosition(ref uint s)
{
fixed (uint* __refParamPtr0 = &s)
{
var __arg0 = __refParamPtr0;
__Internal.AddPosition((__Instance + __PointerAdjustment), __arg0);
}
}
public void ClearPosition()
{
__Internal.ClearPosition((__Instance + __PointerAdjustment));
}
public uint PositionCount
{
get
{
var __ret = __Internal.GetPositionCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class VerbatimBlockLineComment : global::CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(8)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VerbatimBlockLineComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VerbatimBlockLineComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VerbatimBlockLineComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VerbatimBlockLineComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VerbatimBlockLineComment __CreateInstance(global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VerbatimBlockLineComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal));
global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VerbatimBlockLineComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VerbatimBlockLineComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.VerbatimBlockLineComment.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class VerbatimBlockComment : global::CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 64)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal uint commandId;
[FieldOffset(8)]
internal global::System.IntPtr paragraphComment;
[FieldOffset(16)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(40)]
internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_VerbatimBlockLineComment___N_std_S_allocator__S0_ Lines;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VerbatimBlockComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VerbatimBlockComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VerbatimBlockComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getLines@VerbatimBlockComment@AST@CppParser@CppSharp@@QEAAPEAVVerbatimBlockLineComment@234@I@Z")]
internal static extern global::System.IntPtr GetLines(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addLines@VerbatimBlockComment@AST@CppParser@CppSharp@@QEAAXAEAPEAVVerbatimBlockLineComment@234@@Z")]
internal static extern void AddLines(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearLines@VerbatimBlockComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearLines(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getLinesCount@VerbatimBlockComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetLinesCount(global::System.IntPtr instance);
}
internal static new global::CppSharp.Parser.AST.VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VerbatimBlockComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VerbatimBlockComment __CreateInstance(global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VerbatimBlockComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal));
global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VerbatimBlockComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VerbatimBlockComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimBlockComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.VerbatimBlockLineComment GetLines(uint i)
{
var __ret = __Internal.GetLines((__Instance + __PointerAdjustment), i);
global::CppSharp.Parser.AST.VerbatimBlockLineComment __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.VerbatimBlockLineComment.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.AST.VerbatimBlockLineComment) global::CppSharp.Parser.AST.VerbatimBlockLineComment.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.AST.VerbatimBlockLineComment.__CreateInstance(__ret);
return __result0;
}
public void AddLines(global::CppSharp.Parser.AST.VerbatimBlockLineComment s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddLines((__Instance + __PointerAdjustment), __arg0);
}
public void ClearLines()
{
__Internal.ClearLines((__Instance + __PointerAdjustment));
}
public uint LinesCount
{
get
{
var __ret = __Internal.GetLinesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class VerbatimLineComment : global::CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 72)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal uint commandId;
[FieldOffset(8)]
internal global::System.IntPtr paragraphComment;
[FieldOffset(16)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_ Arguments;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VerbatimLineComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0VerbatimLineComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1VerbatimLineComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VerbatimLineComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.VerbatimLineComment __CreateInstance(global::CppSharp.Parser.AST.VerbatimLineComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.VerbatimLineComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.VerbatimLineComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimLineComment.__Internal));
global::CppSharp.Parser.AST.VerbatimLineComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected VerbatimLineComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public VerbatimLineComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimLineComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.VerbatimLineComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.VerbatimLineComment.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.VerbatimLineComment.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class InlineCommandComment : global::CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte hasTrailingNewline;
[FieldOffset(8)]
internal uint commandId;
[FieldOffset(12)]
internal global::CppSharp.Parser.AST.InlineCommandComment.RenderKind commentRenderKind;
[FieldOffset(16)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_InlineCommandComment_S_Argument___N_std_S_allocator__S0_ Arguments;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InlineCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InlineCommandComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1InlineCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@InlineCommandComment@AST@CppParser@CppSharp@@QEAA?AVArgument@1234@I@Z")]
internal static extern void GetArguments(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@InlineCommandComment@AST@CppParser@CppSharp@@QEAAXAEAVArgument@1234@@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@InlineCommandComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@InlineCommandComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
}
public enum RenderKind
{
RenderNormal = 0,
RenderBold = 1,
RenderMonospaced = 2,
RenderEmphasized = 3
}
public unsafe partial class Argument : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Argument@InlineCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Argument@InlineCommandComment@AST@CppParser@CppSharp@@QEAA@AEBV01234@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Argument@InlineCommandComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.InlineCommandComment.Argument> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.InlineCommandComment.Argument>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.InlineCommandComment.Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InlineCommandComment.Argument(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.InlineCommandComment.Argument __CreateInstance(global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InlineCommandComment.Argument(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal));
global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Argument(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Argument()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.InlineCommandComment.Argument __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
internal static new global::CppSharp.Parser.AST.InlineCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InlineCommandComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.InlineCommandComment __CreateInstance(global::CppSharp.Parser.AST.InlineCommandComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.InlineCommandComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.InlineCommandComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineCommandComment.__Internal));
global::CppSharp.Parser.AST.InlineCommandComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected InlineCommandComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public InlineCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.InlineCommandComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.InlineCommandComment.Argument GetArguments(uint i)
{
var __ret = new global::CppSharp.Parser.AST.InlineCommandComment.Argument.__Internal();
__Internal.GetArguments((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.InlineCommandComment.Argument.__CreateInstance(__ret);
}
public void AddArguments(global::CppSharp.Parser.AST.InlineCommandComment.Argument s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddArguments((__Instance + __PointerAdjustment), __arg0);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public uint CommandId
{
get
{
return ((global::CppSharp.Parser.AST.InlineCommandComment.__Internal*) __Instance)->commandId;
}
set
{
((global::CppSharp.Parser.AST.InlineCommandComment.__Internal*) __Instance)->commandId = value;
}
}
public global::CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind
{
get
{
return ((global::CppSharp.Parser.AST.InlineCommandComment.__Internal*) __Instance)->commentRenderKind;
}
set
{
((global::CppSharp.Parser.AST.InlineCommandComment.__Internal*) __Instance)->commentRenderKind = value;
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class HTMLTagComment : global::CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte hasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLTagComment@AST@CppParser@CppSharp@@QEAA@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, global::CppSharp.Parser.AST.CommentKind Kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLTagComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
internal static new global::CppSharp.Parser.AST.HTMLTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLTagComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.HTMLTagComment __CreateInstance(global::CppSharp.Parser.AST.HTMLTagComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLTagComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.HTMLTagComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLTagComment.__Internal));
*(global::CppSharp.Parser.AST.HTMLTagComment.__Internal*) ret = native;
return ret.ToPointer();
}
private HTMLTagComment(global::CppSharp.Parser.AST.HTMLTagComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected HTMLTagComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public HTMLTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public HTMLTagComment(global::CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment), Kind);
}
public HTMLTagComment(global::CppSharp.Parser.AST.HTMLTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.AST.HTMLTagComment.__Internal*) __Instance) = *((global::CppSharp.Parser.AST.HTMLTagComment.__Internal*) _0.__Instance);
}
public static implicit operator global::CppSharp.Parser.AST.HTMLTagComment(global::CppSharp.Parser.AST.CommentKind Kind)
{
return new global::CppSharp.Parser.AST.HTMLTagComment(Kind);
}
}
public unsafe partial class HTMLStartTagComment : global::CppSharp.Parser.AST.HTMLTagComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 64)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte hasTrailingNewline;
[FieldOffset(8)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C tagName;
[FieldOffset(40)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_HTMLStartTagComment_S_Attribute___N_std_S_allocator__S0_ Attributes;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getAttributes@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA?AVAttribute@1234@I@Z")]
internal static extern void GetAttributes(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addAttributes@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAAXAEAVAttribute@1234@@Z")]
internal static extern void AddAttributes(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearAttributes@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearAttributes(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getAttributesCount@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetAttributesCount(global::System.IntPtr instance);
}
public unsafe partial class Attribute : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 64)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C name;
[FieldOffset(32)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C value;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Attribute@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0Attribute@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@AEBV01234@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1Attribute@HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute __CreateInstance(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal));
global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Attribute(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Attribute()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Name
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal*) __Instance)->name);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal*) __Instance)->name = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string Value
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal*) __Instance)->value);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal*) __Instance)->value = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
internal static new global::CppSharp.Parser.AST.HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLStartTagComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.HTMLStartTagComment __CreateInstance(global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLStartTagComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal));
global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected HTMLStartTagComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public HTMLStartTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute GetAttributes(uint i)
{
var __ret = new global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__Internal();
__Internal.GetAttributes((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute.__CreateInstance(__ret);
}
public void AddAttributes(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddAttributes((__Instance + __PointerAdjustment), __arg0);
}
public void ClearAttributes()
{
__Internal.ClearAttributes((__Instance + __PointerAdjustment));
}
public string TagName
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal*) __Instance)->tagName);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.HTMLStartTagComment.__Internal*) __Instance)->tagName = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public uint AttributesCount
{
get
{
var __ret = __Internal.GetAttributesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class HTMLEndTagComment : global::CppSharp.Parser.AST.HTMLTagComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte hasTrailingNewline;
[FieldOffset(8)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C tagName;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLEndTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLEndTagComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1HTMLEndTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLEndTagComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.HTMLEndTagComment __CreateInstance(global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.HTMLEndTagComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal));
global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected HTMLEndTagComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public HTMLEndTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string TagName
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal*) __Instance)->tagName);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.HTMLEndTagComment.__Internal*) __Instance)->tagName = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class TextComment : global::CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.CommentKind kind;
[FieldOffset(4)]
internal byte hasTrailingNewline;
[FieldOffset(8)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TextComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TextComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TextComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
internal static new global::CppSharp.Parser.AST.TextComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TextComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.TextComment __CreateInstance(global::CppSharp.Parser.AST.TextComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.TextComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.TextComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TextComment.__Internal));
global::CppSharp.Parser.AST.TextComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TextComment(global::CppSharp.Parser.AST.TextComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TextComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TextComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TextComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public TextComment(global::CppSharp.Parser.AST.TextComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.TextComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public override void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.TextComment.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.TextComment.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
}
public unsafe partial class RawComment : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 80)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.AST.RawCommentKind kind;
[FieldOffset(8)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C text;
[FieldOffset(40)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C briefText;
[FieldOffset(72)]
internal global::System.IntPtr fullCommentBlock;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0RawComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0RawComment@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1RawComment@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.RawComment> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.AST.RawComment>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.AST.RawComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.RawComment(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.AST.RawComment __CreateInstance(global::CppSharp.Parser.AST.RawComment.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.AST.RawComment(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.AST.RawComment.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.RawComment.__Internal));
global::CppSharp.Parser.AST.RawComment.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private RawComment(global::CppSharp.Parser.AST.RawComment.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected RawComment(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public RawComment()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.RawComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public RawComment(global::CppSharp.Parser.AST.RawComment _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.AST.RawComment.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.AST.RawComment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.AST.RawCommentKind Kind
{
get
{
return ((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->kind = value;
}
}
public string Text
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->text);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->text = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string BriefText
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->briefText);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->briefText = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.FullComment FullCommentBlock
{
get
{
global::CppSharp.Parser.AST.FullComment __result0;
if (((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->fullCommentBlock == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.FullComment.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->fullCommentBlock))
__result0 = (global::CppSharp.Parser.AST.FullComment) global::CppSharp.Parser.AST.FullComment.NativeToManagedMap[((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->fullCommentBlock];
else __result0 = global::CppSharp.Parser.AST.FullComment.__CreateInstance(((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->fullCommentBlock);
return __result0;
}
set
{
((global::CppSharp.Parser.AST.RawComment.__Internal*) __Instance)->fullCommentBlock = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
}
}
}
namespace CppSharp
{
namespace Parser
{
public unsafe partial struct SourceLocation
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public partial struct __Internal
{
[FieldOffset(0)]
internal uint ID;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0SourceLocation@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0SourceLocation@CppParser@CppSharp@@QEAA@I@Z")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance, uint ID);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0SourceLocation@CppParser@CppSharp@@QEAA@AEBU012@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
private SourceLocation.__Internal __instance;
internal SourceLocation.__Internal __Instance { get { return __instance; } }
internal static global::CppSharp.Parser.SourceLocation __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.SourceLocation(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.SourceLocation __CreateInstance(global::CppSharp.Parser.SourceLocation.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.SourceLocation(native, skipVTables);
}
private SourceLocation(global::CppSharp.Parser.SourceLocation.__Internal native, bool skipVTables = false)
: this()
{
__instance = native;
}
private SourceLocation(void* native, bool skipVTables = false) : this()
{
__instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native;
}
public SourceLocation(uint ID)
: this()
{
fixed (__Internal* __instancePtr = &__instance)
{
__Internal.ctor(new global::System.IntPtr(__instancePtr), ID);
}
}
public SourceLocation(global::CppSharp.Parser.SourceLocation _0)
: this()
{
var ____arg0 = _0.__Instance;
var __arg0 = new global::System.IntPtr(&____arg0);
fixed (__Internal* __instancePtr = &__instance)
{
__Internal.cctor(new global::System.IntPtr(__instancePtr), __arg0);
}
}
public static implicit operator global::CppSharp.Parser.SourceLocation(uint ID)
{
return new global::CppSharp.Parser.SourceLocation(ID);
}
public uint ID
{
get
{
return __instance.ID;
}
set
{
__instance.ID = value;
}
}
}
}
}
namespace CppSharp
{
namespace Parser
{
public enum ParserIntType
{
NoInt = 0,
SignedChar = 1,
UnsignedChar = 2,
SignedShort = 3,
UnsignedShort = 4,
SignedInt = 5,
UnsignedInt = 6,
SignedLong = 7,
UnsignedLong = 8,
SignedLongLong = 9,
UnsignedLongLong = 10
}
public unsafe partial class ParserTargetInfo : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 192)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C ABI;
[FieldOffset(32)]
internal global::CppSharp.Parser.ParserIntType char16Type;
[FieldOffset(36)]
internal global::CppSharp.Parser.ParserIntType char32Type;
[FieldOffset(40)]
internal global::CppSharp.Parser.ParserIntType int64Type;
[FieldOffset(44)]
internal global::CppSharp.Parser.ParserIntType intMaxType;
[FieldOffset(48)]
internal global::CppSharp.Parser.ParserIntType intPtrType;
[FieldOffset(52)]
internal global::CppSharp.Parser.ParserIntType sizeType;
[FieldOffset(56)]
internal global::CppSharp.Parser.ParserIntType uIntMaxType;
[FieldOffset(60)]
internal global::CppSharp.Parser.ParserIntType wCharType;
[FieldOffset(64)]
internal global::CppSharp.Parser.ParserIntType wIntType;
[FieldOffset(68)]
internal uint boolAlign;
[FieldOffset(72)]
internal uint boolWidth;
[FieldOffset(76)]
internal uint charAlign;
[FieldOffset(80)]
internal uint charWidth;
[FieldOffset(84)]
internal uint char16Align;
[FieldOffset(88)]
internal uint char16Width;
[FieldOffset(92)]
internal uint char32Align;
[FieldOffset(96)]
internal uint char32Width;
[FieldOffset(100)]
internal uint halfAlign;
[FieldOffset(104)]
internal uint halfWidth;
[FieldOffset(108)]
internal uint floatAlign;
[FieldOffset(112)]
internal uint floatWidth;
[FieldOffset(116)]
internal uint doubleAlign;
[FieldOffset(120)]
internal uint doubleWidth;
[FieldOffset(124)]
internal uint shortAlign;
[FieldOffset(128)]
internal uint shortWidth;
[FieldOffset(132)]
internal uint intAlign;
[FieldOffset(136)]
internal uint intWidth;
[FieldOffset(140)]
internal uint intMaxTWidth;
[FieldOffset(144)]
internal uint longAlign;
[FieldOffset(148)]
internal uint longWidth;
[FieldOffset(152)]
internal uint longDoubleAlign;
[FieldOffset(156)]
internal uint longDoubleWidth;
[FieldOffset(160)]
internal uint longLongAlign;
[FieldOffset(164)]
internal uint longLongWidth;
[FieldOffset(168)]
internal uint pointerAlign;
[FieldOffset(172)]
internal uint pointerWidth;
[FieldOffset(176)]
internal uint wCharAlign;
[FieldOffset(180)]
internal uint wCharWidth;
[FieldOffset(184)]
internal uint float128Align;
[FieldOffset(188)]
internal uint float128Width;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParserTargetInfo@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParserTargetInfo@CppParser@CppSharp@@QEAA@AEBU012@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ParserTargetInfo@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ParserTargetInfo> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ParserTargetInfo>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ParserTargetInfo(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.ParserTargetInfo __CreateInstance(global::CppSharp.Parser.ParserTargetInfo.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ParserTargetInfo(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.ParserTargetInfo.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserTargetInfo.__Internal));
global::CppSharp.Parser.ParserTargetInfo.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParserTargetInfo(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParserTargetInfo()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserTargetInfo.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserTargetInfo.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.ParserTargetInfo __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string ABI
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->ABI);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->ABI = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.ParserIntType Char16Type
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char16Type;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char16Type = value;
}
}
public global::CppSharp.Parser.ParserIntType Char32Type
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char32Type;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char32Type = value;
}
}
public global::CppSharp.Parser.ParserIntType Int64Type
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->int64Type;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->int64Type = value;
}
}
public global::CppSharp.Parser.ParserIntType IntMaxType
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intMaxType;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intMaxType = value;
}
}
public global::CppSharp.Parser.ParserIntType IntPtrType
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intPtrType;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intPtrType = value;
}
}
public global::CppSharp.Parser.ParserIntType SizeType
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->sizeType;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->sizeType = value;
}
}
public global::CppSharp.Parser.ParserIntType UIntMaxType
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->uIntMaxType;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->uIntMaxType = value;
}
}
public global::CppSharp.Parser.ParserIntType WCharType
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wCharType;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wCharType = value;
}
}
public global::CppSharp.Parser.ParserIntType WIntType
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wIntType;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wIntType = value;
}
}
public uint BoolAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->boolAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->boolAlign = value;
}
}
public uint BoolWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->boolWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->boolWidth = value;
}
}
public uint CharAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->charAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->charAlign = value;
}
}
public uint CharWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->charWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->charWidth = value;
}
}
public uint Char16Align
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char16Align;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char16Align = value;
}
}
public uint Char16Width
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char16Width;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char16Width = value;
}
}
public uint Char32Align
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char32Align;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char32Align = value;
}
}
public uint Char32Width
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char32Width;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->char32Width = value;
}
}
public uint HalfAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->halfAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->halfAlign = value;
}
}
public uint HalfWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->halfWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->halfWidth = value;
}
}
public uint FloatAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->floatAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->floatAlign = value;
}
}
public uint FloatWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->floatWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->floatWidth = value;
}
}
public uint DoubleAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->doubleAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->doubleAlign = value;
}
}
public uint DoubleWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->doubleWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->doubleWidth = value;
}
}
public uint ShortAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->shortAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->shortAlign = value;
}
}
public uint ShortWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->shortWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->shortWidth = value;
}
}
public uint IntAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intAlign = value;
}
}
public uint IntWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intWidth = value;
}
}
public uint IntMaxTWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intMaxTWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->intMaxTWidth = value;
}
}
public uint LongAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longAlign = value;
}
}
public uint LongWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longWidth = value;
}
}
public uint LongDoubleAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longDoubleAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longDoubleAlign = value;
}
}
public uint LongDoubleWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longDoubleWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longDoubleWidth = value;
}
}
public uint LongLongAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longLongAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longLongAlign = value;
}
}
public uint LongLongWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longLongWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->longLongWidth = value;
}
}
public uint PointerAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->pointerAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->pointerAlign = value;
}
}
public uint PointerWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->pointerWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->pointerWidth = value;
}
}
public uint WCharAlign
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wCharAlign;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wCharAlign = value;
}
}
public uint WCharWidth
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wCharWidth;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->wCharWidth = value;
}
}
public uint Float128Align
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->float128Align;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->float128Align = value;
}
}
public uint Float128Width
{
get
{
return ((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->float128Width;
}
set
{
((global::CppSharp.Parser.ParserTargetInfo.__Internal*) __Instance)->float128Width = value;
}
}
}
}
}
namespace CppSharp
{
namespace Parser
{
public enum ParserDiagnosticLevel
{
Ignored = 0,
Note = 1,
Warning = 2,
Error = 3,
Fatal = 4
}
public enum ParserResultKind
{
Success = 0,
Error = 1,
FileNotFound = 2
}
public enum SourceLocationKind
{
Invalid = 0,
Builtin = 1,
CommandLine = 2,
System = 3,
User = 4
}
public unsafe partial class Parser
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct __Internal
{
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.Parser(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal));
*(global::CppSharp.Parser.Parser.__Internal*) ret = native;
return ret.ToPointer();
}
private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Parser(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
}
public unsafe partial class CppParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 312)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ Arguments;
[FieldOffset(24)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C libraryFile;
[FieldOffset(56)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ SourceFiles;
[FieldOffset(80)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ IncludeDirs;
[FieldOffset(104)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ SystemIncludeDirs;
[FieldOffset(128)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ Defines;
[FieldOffset(152)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ Undefines;
[FieldOffset(176)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ LibraryDirs;
[FieldOffset(200)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_ SupportedStdTypes;
[FieldOffset(224)]
internal global::System.IntPtr ASTContext;
[FieldOffset(232)]
internal int toolSetToUse;
[FieldOffset(240)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C targetTriple;
[FieldOffset(272)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C currentDir;
[FieldOffset(304)]
internal global::CppSharp.Parser.AST.CppAbi abi;
[FieldOffset(308)]
internal byte noStandardIncludes;
[FieldOffset(309)]
internal byte noBuiltinIncludes;
[FieldOffset(310)]
internal byte microsoftMode;
[FieldOffset(311)]
internal byte verbose;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0CppParserOptions@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0CppParserOptions@CppParser@CppSharp@@QEAA@AEBU012@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1CppParserOptions@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArguments@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetArguments(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addArguments@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddArguments(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearArguments@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearArguments(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSourceFiles@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetSourceFiles(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSourceFiles@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddSourceFiles(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSourceFiles@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSourceFiles(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getIncludeDirs@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetIncludeDirs(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addIncludeDirs@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddIncludeDirs(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearIncludeDirs@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearIncludeDirs(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSystemIncludeDirs@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetSystemIncludeDirs(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSystemIncludeDirs@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddSystemIncludeDirs(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSystemIncludeDirs@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSystemIncludeDirs(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getDefines@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetDefines(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addDefines@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddDefines(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearDefines@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearDefines(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getUndefines@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetUndefines(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addUndefines@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddUndefines(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearUndefines@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearUndefines(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getLibraryDirs@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetLibraryDirs(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addLibraryDirs@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddLibraryDirs(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearLibraryDirs@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearLibraryDirs(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSupportedStdTypes@CppParserOptions@CppParser@CppSharp@@QEAAPEBDI@Z")]
internal static extern global::System.IntPtr GetSupportedStdTypes(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addSupportedStdTypes@CppParserOptions@CppParser@CppSharp@@QEAAXPEBD@Z")]
internal static extern void AddSupportedStdTypes(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearSupportedStdTypes@CppParserOptions@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearSupportedStdTypes(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getArgumentsCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetArgumentsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSourceFilesCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSourceFilesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getIncludeDirsCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetIncludeDirsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSystemIncludeDirsCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSystemIncludeDirsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getDefinesCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetDefinesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getUndefinesCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetUndefinesCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getLibraryDirsCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetLibraryDirsCount(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getSupportedStdTypesCount@CppParserOptions@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetSupportedStdTypesCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.CppParserOptions> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.CppParserOptions>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.CppParserOptions __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.CppParserOptions(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.CppParserOptions __CreateInstance(global::CppSharp.Parser.CppParserOptions.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.CppParserOptions(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.CppParserOptions.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.CppParserOptions.__Internal));
global::CppSharp.Parser.CppParserOptions.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private CppParserOptions(global::CppSharp.Parser.CppParserOptions.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected CppParserOptions(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public CppParserOptions()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.CppParserOptions.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.CppParserOptions.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.CppParserOptions __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string GetArguments(uint i)
{
var __ret = __Internal.GetArguments((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddArguments(string s)
{
__Internal.AddArguments((__Instance + __PointerAdjustment), s);
}
public void ClearArguments()
{
__Internal.ClearArguments((__Instance + __PointerAdjustment));
}
public string GetSourceFiles(uint i)
{
var __ret = __Internal.GetSourceFiles((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddSourceFiles(string s)
{
__Internal.AddSourceFiles((__Instance + __PointerAdjustment), s);
}
public void ClearSourceFiles()
{
__Internal.ClearSourceFiles((__Instance + __PointerAdjustment));
}
public string GetIncludeDirs(uint i)
{
var __ret = __Internal.GetIncludeDirs((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddIncludeDirs(string s)
{
__Internal.AddIncludeDirs((__Instance + __PointerAdjustment), s);
}
public void ClearIncludeDirs()
{
__Internal.ClearIncludeDirs((__Instance + __PointerAdjustment));
}
public string GetSystemIncludeDirs(uint i)
{
var __ret = __Internal.GetSystemIncludeDirs((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddSystemIncludeDirs(string s)
{
__Internal.AddSystemIncludeDirs((__Instance + __PointerAdjustment), s);
}
public void ClearSystemIncludeDirs()
{
__Internal.ClearSystemIncludeDirs((__Instance + __PointerAdjustment));
}
public string GetDefines(uint i)
{
var __ret = __Internal.GetDefines((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddDefines(string s)
{
__Internal.AddDefines((__Instance + __PointerAdjustment), s);
}
public void ClearDefines()
{
__Internal.ClearDefines((__Instance + __PointerAdjustment));
}
public string GetUndefines(uint i)
{
var __ret = __Internal.GetUndefines((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddUndefines(string s)
{
__Internal.AddUndefines((__Instance + __PointerAdjustment), s);
}
public void ClearUndefines()
{
__Internal.ClearUndefines((__Instance + __PointerAdjustment));
}
public string GetLibraryDirs(uint i)
{
var __ret = __Internal.GetLibraryDirs((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddLibraryDirs(string s)
{
__Internal.AddLibraryDirs((__Instance + __PointerAdjustment), s);
}
public void ClearLibraryDirs()
{
__Internal.ClearLibraryDirs((__Instance + __PointerAdjustment));
}
public string GetSupportedStdTypes(uint i)
{
var __ret = __Internal.GetSupportedStdTypes((__Instance + __PointerAdjustment), i);
return Marshal.PtrToStringAnsi(__ret);
}
public void AddSupportedStdTypes(string s)
{
__Internal.AddSupportedStdTypes((__Instance + __PointerAdjustment), s);
}
public void ClearSupportedStdTypes()
{
__Internal.ClearSupportedStdTypes((__Instance + __PointerAdjustment));
}
public string LibraryFile
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->libraryFile);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->libraryFile = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.ASTContext ASTContext
{
get
{
global::CppSharp.Parser.AST.ASTContext __result0;
if (((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->ASTContext == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.ASTContext.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->ASTContext))
__result0 = (global::CppSharp.Parser.AST.ASTContext) global::CppSharp.Parser.AST.ASTContext.NativeToManagedMap[((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->ASTContext];
else __result0 = global::CppSharp.Parser.AST.ASTContext.__CreateInstance(((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->ASTContext);
return __result0;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->ASTContext = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public int ToolSetToUse
{
get
{
return ((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->toolSetToUse;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->toolSetToUse = value;
}
}
public string TargetTriple
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->targetTriple);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->targetTriple = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string CurrentDir
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->currentDir);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->currentDir = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.AST.CppAbi Abi
{
get
{
return ((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->abi;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->abi = value;
}
}
public bool NoStandardIncludes
{
get
{
return ((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->noStandardIncludes != 0;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->noStandardIncludes = (byte) (value ? 1 : 0);
}
}
public bool NoBuiltinIncludes
{
get
{
return ((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->noBuiltinIncludes != 0;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->noBuiltinIncludes = (byte) (value ? 1 : 0);
}
}
public bool MicrosoftMode
{
get
{
return ((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->microsoftMode != 0;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->microsoftMode = (byte) (value ? 1 : 0);
}
}
public bool Verbose
{
get
{
return ((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->verbose != 0;
}
set
{
((global::CppSharp.Parser.CppParserOptions.__Internal*) __Instance)->verbose = (byte) (value ? 1 : 0);
}
}
public uint ArgumentsCount
{
get
{
var __ret = __Internal.GetArgumentsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint SourceFilesCount
{
get
{
var __ret = __Internal.GetSourceFilesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint IncludeDirsCount
{
get
{
var __ret = __Internal.GetIncludeDirsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint SystemIncludeDirsCount
{
get
{
var __ret = __Internal.GetSystemIncludeDirsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint DefinesCount
{
get
{
var __ret = __Internal.GetDefinesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint UndefinesCount
{
get
{
var __ret = __Internal.GetUndefinesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint LibraryDirsCount
{
get
{
var __ret = __Internal.GetLibraryDirsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint SupportedStdTypesCount
{
get
{
var __ret = __Internal.GetSupportedStdTypesCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class ParserDiagnostic : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 80)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C fileName;
[FieldOffset(32)]
internal global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C message;
[FieldOffset(64)]
internal global::CppSharp.Parser.ParserDiagnosticLevel level;
[FieldOffset(68)]
internal int lineNumber;
[FieldOffset(72)]
internal int columnNumber;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QEAA@AEBU012@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ParserDiagnostic@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ParserDiagnostic> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ParserDiagnostic>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ParserDiagnostic(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.ParserDiagnostic __CreateInstance(global::CppSharp.Parser.ParserDiagnostic.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ParserDiagnostic(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.ParserDiagnostic.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserDiagnostic.__Internal));
global::CppSharp.Parser.ParserDiagnostic.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParserDiagnostic(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParserDiagnostic()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserDiagnostic.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserDiagnostic.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.ParserDiagnostic __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public string FileName
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->fileName);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->fileName = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public string Message
{
get
{
var __basicStringRet = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->message);
var __stringRet = global::Std.BasicStringExtensions.CStr(__basicStringRet);
__basicStringRet.Dispose(false);
return __stringRet;
}
set
{
var __allocator0 = new global::Std.Allocator<sbyte>();
var __basicString0 = global::Std.BasicStringExtensions.BasicString(value, __allocator0);
((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->message = *(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) __basicString0.__Instance;
}
}
public global::CppSharp.Parser.ParserDiagnosticLevel Level
{
get
{
return ((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->level;
}
set
{
((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->level = value;
}
}
public int LineNumber
{
get
{
return ((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->lineNumber;
}
set
{
((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->lineNumber = value;
}
}
public int ColumnNumber
{
get
{
return ((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->columnNumber;
}
set
{
((global::CppSharp.Parser.ParserDiagnostic.__Internal*) __Instance)->columnNumber = value;
}
}
}
public unsafe partial class ParserResult : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 56)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::CppSharp.Parser.ParserResultKind kind;
[FieldOffset(8)]
internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_S_ParserDiagnostic___N_std_S_allocator__S0_ Diagnostics;
[FieldOffset(32)]
internal global::System.IntPtr library;
[FieldOffset(40)]
internal global::System.IntPtr targetInfo;
[FieldOffset(48)]
internal global::System.IntPtr codeParser;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QEAA@AEBU012@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1ParserResult@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getDiagnostics@ParserResult@CppParser@CppSharp@@QEAA?AUParserDiagnostic@23@I@Z")]
internal static extern void GetDiagnostics(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addDiagnostics@ParserResult@CppParser@CppSharp@@QEAAXAEAUParserDiagnostic@23@@Z")]
internal static extern void AddDiagnostics(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearDiagnostics@ParserResult@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void ClearDiagnostics(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getDiagnosticsCount@ParserResult@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint GetDiagnosticsCount(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ParserResult> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ParserResult>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.ParserResult __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ParserResult(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.ParserResult __CreateInstance(global::CppSharp.Parser.ParserResult.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ParserResult(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.ParserResult.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserResult.__Internal));
global::CppSharp.Parser.ParserResult.__Internal.cctor(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParserResult(global::CppSharp.Parser.ParserResult.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParserResult(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParserResult()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserResult.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor((__Instance + __PointerAdjustment));
}
public ParserResult(global::CppSharp.Parser.ParserResult _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ParserResult.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
__Internal.cctor((__Instance + __PointerAdjustment), __arg0);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.ParserResult __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public global::CppSharp.Parser.ParserDiagnostic GetDiagnostics(uint i)
{
var __ret = new global::CppSharp.Parser.ParserDiagnostic.__Internal();
__Internal.GetDiagnostics((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
return global::CppSharp.Parser.ParserDiagnostic.__CreateInstance(__ret);
}
public void AddDiagnostics(global::CppSharp.Parser.ParserDiagnostic s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
__Internal.AddDiagnostics((__Instance + __PointerAdjustment), __arg0);
}
public void ClearDiagnostics()
{
__Internal.ClearDiagnostics((__Instance + __PointerAdjustment));
}
public global::CppSharp.Parser.ParserResultKind Kind
{
get
{
return ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->kind;
}
set
{
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->kind = value;
}
}
public global::CppSharp.Parser.AST.NativeLibrary Library
{
get
{
global::CppSharp.Parser.AST.NativeLibrary __result0;
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->library == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.AST.NativeLibrary.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->library))
__result0 = (global::CppSharp.Parser.AST.NativeLibrary) global::CppSharp.Parser.AST.NativeLibrary.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->library];
else __result0 = global::CppSharp.Parser.AST.NativeLibrary.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->library);
return __result0;
}
set
{
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->library = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.ParserTargetInfo TargetInfo
{
get
{
global::CppSharp.Parser.ParserTargetInfo __result0;
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->targetInfo == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.ParserTargetInfo.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->targetInfo))
__result0 = (global::CppSharp.Parser.ParserTargetInfo) global::CppSharp.Parser.ParserTargetInfo.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->targetInfo];
else __result0 = global::CppSharp.Parser.ParserTargetInfo.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->targetInfo);
return __result0;
}
set
{
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->targetInfo = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public global::CppSharp.Parser.Parser CodeParser
{
get
{
global::CppSharp.Parser.Parser __result0;
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser))
__result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser];
else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser);
return __result0;
}
set
{
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public uint DiagnosticsCount
{
get
{
var __ret = __Internal.GetDiagnosticsCount((__Instance + __PointerAdjustment));
return __ret;
}
}
}
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0ClangParser@CppParser@CppSharp@@QEAA@AEBV012@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?ParseHeader@ClangParser@CppParser@CppSharp@@SAPEAUParserResult@23@PEAUCppParserOptions@23@@Z")]
internal static extern global::System.IntPtr ParseHeader(global::System.IntPtr Opts);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?ParseLibrary@ClangParser@CppParser@CppSharp@@SAPEAUParserResult@23@PEAUCppParserOptions@23@@Z")]
internal static extern global::System.IntPtr ParseLibrary(global::System.IntPtr Opts);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ClangParser> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.ClangParser>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::CppSharp.Parser.ClangParser __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ClangParser(native.ToPointer(), skipVTables);
}
internal static global::CppSharp.Parser.ClangParser __CreateInstance(global::CppSharp.Parser.ClangParser.__Internal native, bool skipVTables = false)
{
return new global::CppSharp.Parser.ClangParser(native, skipVTables);
}
private static void* __CopyValue(global::CppSharp.Parser.ClangParser.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ClangParser.__Internal));
*(global::CppSharp.Parser.ClangParser.__Internal*) ret = native;
return ret.ToPointer();
}
private ClangParser(global::CppSharp.Parser.ClangParser.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ClangParser(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ClangParser()
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ClangParser.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
public ClangParser(global::CppSharp.Parser.ClangParser _0)
{
__Instance = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.ClangParser.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((global::CppSharp.Parser.ClangParser.__Internal*) __Instance) = *((global::CppSharp.Parser.ClangParser.__Internal*) _0.__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::CppSharp.Parser.ClangParser __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
public static global::CppSharp.Parser.ParserResult ParseHeader(global::CppSharp.Parser.CppParserOptions Opts)
{
var __arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = __Internal.ParseHeader(__arg0);
global::CppSharp.Parser.ParserResult __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.ParserResult.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.ParserResult) global::CppSharp.Parser.ParserResult.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.ParserResult.__CreateInstance(__ret);
return __result0;
}
public static global::CppSharp.Parser.ParserResult ParseLibrary(global::CppSharp.Parser.CppParserOptions Opts)
{
var __arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = __Internal.ParseLibrary(__arg0);
global::CppSharp.Parser.ParserResult __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::CppSharp.Parser.ParserResult.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::CppSharp.Parser.ParserResult) global::CppSharp.Parser.ParserResult.NativeToManagedMap[__ret];
else __result0 = global::CppSharp.Parser.ParserResult.__CreateInstance(__ret);
return __result0;
}
}
}
}
namespace Std
{
namespace pair
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internalc__N_std_S_pair__1__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration
{
}
}
}
| 51.857988 | 324 | 0.569432 | [
"MIT"
] | david-bouyssie/CppSharp | src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs | 998,733 | C# |
using NetDevPack.Domain;
using System.Collections.Generic;
namespace NetDevPack.Tests.Domain.Assets
{
/// https://docs.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/implement-value-objects#value-object-implementation-in-c
public class Address : ValueObject
{
public string Street { get; private set; }
public string City { get; private set; }
public string State { get; private set; }
public string Country { get; private set; }
public string ZipCode { get; private set; }
public Address() { }
public Address(string street, string city, string state, string country, string zipcode)
{
Street = street;
City = city;
State = state;
Country = country;
ZipCode = zipcode;
}
protected override IEnumerable<object> GetEqualityComponents()
{
// Using a yield return statement to return each element one at a time for base ValueObject
yield return Street;
yield return City;
yield return State;
yield return Country;
yield return ZipCode;
}
}
}
| 33.108108 | 162 | 0.617143 | [
"MIT"
] | EduardoPires/NetDevPack | tests/NetDevPack.Tests/Domain/Assets/Address.cs | 1,227 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Inventor;
public class InventorManager
{
private static Lazy<InventorManager> _instance = new Lazy<InventorManager>(() => new InventorManager());
public static InventorManager Instance
{
get
{
try
{
return _instance.Value;
}
catch
{
_instance = new Lazy<InventorManager>(() => new InventorManager());
return null;
}
}
}
public bool loaded = false;
public Application InventorInstance;
//private AssemblyDocument RobotDocument;
public _Document ActiveDocument
{
get
{
if (!loaded) LoadInventor();
return InventorInstance.ActiveDocument;
}
}
public AssemblyDocument AssemblyDocument
{
get
{
if (!loaded) LoadInventor();
return (AssemblyDocument) ActiveDocument;
}
}
public AssemblyComponentDefinition ComponentDefinition
{
get
{
if (!loaded) LoadInventor();
return AssemblyDocument.ComponentDefinition;
}
}
public ComponentOccurrences ComponentOccurrences
{
get
{
if (!loaded) LoadInventor();
return ComponentDefinition.Occurrences;
}
}
public CommandManager CommandManager
{
get
{
if (!loaded) LoadInventor();
return InventorInstance.CommandManager;
}
}
public TransientGeometry TransientGeometry
{
get
{
if (!loaded) LoadInventor();
return InventorInstance.TransientGeometry;
}
}
public TransientObjects TransientObjects
{
get
{
if (!loaded) LoadInventor();
return InventorInstance.TransientObjects;
}
}
public UserInterfaceManager UserInterfaceManager
{
get
{
if (!loaded) LoadInventor();
return InventorInstance.UserInterfaceManager;
}
}
private InteractionEvents _interactionEvents;
public InteractionEvents InteractionEvents
{
get
{
if (!loaded) LoadInventor();
if (_interactionEvents == null) _interactionEvents = CommandManager.CreateInteractionEvents();
return _interactionEvents;
}
}
public SelectEvents SelectEvents
{
get
{
if (!loaded) LoadInventor();
return InteractionEvents.SelectEvents;
}
}
private InventorManager()
{
LoadInventor();
}
~InventorManager()
{
ReleaseInventor();
}
private void LoadInventor()
{
try
{
InventorInstance = (Application)Marshal.GetActiveObject("Inventor.Application");
_interactionEvents = null;
loaded = true;
}
catch (COMException e)
{
throw new COMException("Couldn't load Inventor instance", e);
}
}
public static void ReleaseInventor()
{
if (Instance == null || !Instance.loaded) return;
try
{
Instance.UserInterfaceManager.UserInteractionDisabled = false;
Marshal.ReleaseComObject(Instance.InventorInstance);
}
catch (COMException e)
{
Console.WriteLine("Couldn't release Inventor instance");
Console.WriteLine(e);
}
Instance.loaded = false;
}
public static void Reload()
{
ReleaseInventor();
Instance.LoadInventor();
}
}
| 21.595506 | 108 | 0.560354 | [
"Apache-2.0"
] | NWalker1208/synthesis | exporters/BxDRobotExporter/robot_exporter/JointResolver/Exporter/InventorManager.cs | 3,846 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNextGen.Network.V20200701
{
/// <summary>
/// PrivateEndpointConnection resource.
/// </summary>
public partial class PrivateLinkServicePrivateEndpointConnection : Pulumi.CustomResource
{
/// <summary>
/// A unique read-only string that changes whenever the resource is updated.
/// </summary>
[Output("etag")]
public Output<string> Etag { get; private set; } = null!;
/// <summary>
/// The consumer link id.
/// </summary>
[Output("linkIdentifier")]
public Output<string> LinkIdentifier { get; private set; } = null!;
/// <summary>
/// The name of the resource that is unique within a resource group. This name can be used to access the resource.
/// </summary>
[Output("name")]
public Output<string?> Name { get; private set; } = null!;
/// <summary>
/// The resource of private end point.
/// </summary>
[Output("privateEndpoint")]
public Output<Outputs.PrivateEndpointResponse> PrivateEndpoint { get; private set; } = null!;
/// <summary>
/// A collection of information about the state of the connection between service consumer and provider.
/// </summary>
[Output("privateLinkServiceConnectionState")]
public Output<Outputs.PrivateLinkServiceConnectionStateResponse?> PrivateLinkServiceConnectionState { get; private set; } = null!;
/// <summary>
/// The provisioning state of the private endpoint connection resource.
/// </summary>
[Output("provisioningState")]
public Output<string> ProvisioningState { get; private set; } = null!;
/// <summary>
/// The resource type.
/// </summary>
[Output("type")]
public Output<string> Type { get; private set; } = null!;
/// <summary>
/// Create a PrivateLinkServicePrivateEndpointConnection resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public PrivateLinkServicePrivateEndpointConnection(string name, PrivateLinkServicePrivateEndpointConnectionArgs args, CustomResourceOptions? options = null)
: base("azure-nextgen:network/v20200701:PrivateLinkServicePrivateEndpointConnection", name, args ?? new PrivateLinkServicePrivateEndpointConnectionArgs(), MakeResourceOptions(options, ""))
{
}
private PrivateLinkServicePrivateEndpointConnection(string name, Input<string> id, CustomResourceOptions? options = null)
: base("azure-nextgen:network/v20200701:PrivateLinkServicePrivateEndpointConnection", name, null, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
Aliases =
{
new Pulumi.Alias { Type = "azure-nextgen:network/latest:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20190901:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20191101:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20191201:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20200301:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20200401:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20200501:PrivateLinkServicePrivateEndpointConnection"},
new Pulumi.Alias { Type = "azure-nextgen:network/v20200601:PrivateLinkServicePrivateEndpointConnection"},
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing PrivateLinkServicePrivateEndpointConnection resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static PrivateLinkServicePrivateEndpointConnection Get(string name, Input<string> id, CustomResourceOptions? options = null)
{
return new PrivateLinkServicePrivateEndpointConnection(name, id, options);
}
}
public sealed class PrivateLinkServicePrivateEndpointConnectionArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Resource ID.
/// </summary>
[Input("id")]
public Input<string>? Id { get; set; }
/// <summary>
/// The name of the resource that is unique within a resource group. This name can be used to access the resource.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
/// <summary>
/// The name of the private end point connection.
/// </summary>
[Input("peConnectionName", required: true)]
public Input<string> PeConnectionName { get; set; } = null!;
/// <summary>
/// A collection of information about the state of the connection between service consumer and provider.
/// </summary>
[Input("privateLinkServiceConnectionState")]
public Input<Inputs.PrivateLinkServiceConnectionStateArgs>? PrivateLinkServiceConnectionState { get; set; }
/// <summary>
/// The name of the resource group.
/// </summary>
[Input("resourceGroupName", required: true)]
public Input<string> ResourceGroupName { get; set; } = null!;
/// <summary>
/// The name of the private link service.
/// </summary>
[Input("serviceName", required: true)]
public Input<string> ServiceName { get; set; } = null!;
public PrivateLinkServicePrivateEndpointConnectionArgs()
{
}
}
}
| 46.25 | 200 | 0.641441 | [
"Apache-2.0"
] | test-wiz-sec/pulumi-azure-nextgen | sdk/dotnet/Network/V20200701/PrivateLinkServicePrivateEndpointConnection.cs | 7,215 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace WindowsFormsApplication1
{
#region "Dispose"
// The following example demonstrates how to create
// a resource class that implements the IDisposable interface
// and the IDisposable.Dispose method.
// A base class that implements IDisposable.
// By implementing IDisposable, you are announcing that
// instances of this type allocate scarce resources.
public class MyResource: IDisposable
{
// Pointer to an external unmanaged resource.
private IntPtr handle;
// Other managed resource this class uses.
private Component component = new Component();
// Track whether Dispose has been called.
private bool disposed = false;
// The class constructor.
public MyResource(IntPtr handle)
{
this.handle = handle;
}
// Implement IDisposable.
// Do not make this method virtual.
// A derived class should not be able to override this method.
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
// Dispose(bool disposing) executes in two distinct scenarios.
// If disposing equals true, the method has been called directly
// or indirectly by a user's code. Managed and unmanaged resources
// can be disposed.
// If disposing equals false, the method has been called by the
// runtime from inside the finalizer and you should not reference
// other objects. Only unmanaged resources can be disposed.
protected virtual void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
component.Dispose();
}
// Call the appropriate methods to clean up
// unmanaged resources here.
// If disposing is false,
// only the following code is executed.
CloseHandle(handle);
handle = IntPtr.Zero;
// Note disposing has been done.
disposed = true;
}
}
// Use interop to call the method necessary
// to clean up the unmanaged resource.
[System.Runtime.InteropServices.DllImport("Kernel32")]
private extern static Boolean CloseHandle(IntPtr handle);
// Use C# destructor syntax for finalization code.
// This destructor will run only if the Dispose method
// does not get called.
// It gives your base class the opportunity to finalize.
// Do not provide destructors in types derived from this class.
~MyResource()
{
// Do not re-create Dispose clean-up code here.
// Calling Dispose(false) is optimal in terms of
// readability and maintainability.
Dispose(false);
}
}
public class BaseResource : IDisposable
{
~BaseResource()
{
// 为了保持代码的可读性性和可维护性,千万不要在这里写释放非托管资源的代码
// 必须以Dispose(false)方式调用,以false告诉Dispose(bool disposing)函数是从垃圾回收器在调用 析构函数 时调用的
Dispose(false);
}
// 无法被客户直接调用
// 如果 disposing 是 true, 那么这个方法是被客户直接调用的,那么托管的,和非托管的资源都可以释放
// 如果 disposing 是 false, 那么函数是从垃圾回收器在调用Finalize时调用的,此时不应当引用其他托管对象所以,只能释放非托管资源
protected virtual void Dispose(bool disposing)
{
// 那么这个方法是被客户直接调用的,那么托管的,和非托管的资源都可以释放
if (disposing)
{
// 释放 托管资源
//其它托管的类资源
//OtherManagedObject.Dispose();
}
//释放非托管资源
//非托管资源,一般想实现Close方法
//DoUnManagedObjectDispose();
// 那么这个方法是被客户直接调用的,告诉垃圾回收器从Finalization队列中清除自己,从而阻止垃圾回收器调用 析构函数 方法.
if (disposing)
GC.SuppressFinalize(this);
}
//可以被客户直接调用
public void Dispose()
{
//必须以Dispose(true)方式调用,以true告诉Dispose(bool disposing)函数是被客户直接调用的
Dispose(true);
}
}
public class MyClass : IDisposable
{
private bool disposed = false;
~MyClass()
{
Dispose(false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if (disposed == false)
{
if (disposing == true)
{
// 释托管代码
// ......
}
// 释非代码
//......
}
disposed = true;
}
}
#endregion
}
| 30.324022 | 91 | 0.557848 | [
"MIT"
] | L-Xiah/theVS | 02C#/Program/WindowsFormsApplication1/WindowsFormsApplication1/Program01CloseClass.cs | 6,040 | C# |
/*
* Location Intelligence APIs
*
* Incorporate our extensive geodata into everyday applications, business processes and workflows.
*
* OpenAPI spec version: 8.5.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace pb.locationIntelligence.Model
{
/// <summary>
/// GeoTaxLocations
/// </summary>
[DataContract]
public partial class GeoTaxLocations : IEquatable<GeoTaxLocations>
{
/// <summary>
/// Initializes a new instance of the <see cref="GeoTaxLocations" /> class.
/// </summary>
[JsonConstructorAttribute]
protected GeoTaxLocations() { }
/// <summary>
/// Initializes a new instance of the <see cref="GeoTaxLocations" /> class.
/// </summary>
/// <param name="Geometry">Geometry (required).</param>
/// <param name="PurchaseAmount">PurchaseAmount.</param>
/// <param name="ObjectId">ObjectId.</param>
public GeoTaxLocations(Geometry Geometry = null, string PurchaseAmount = null, string ObjectId = null)
{
// to ensure "Geometry" is required (not null)
if (Geometry == null)
{
throw new InvalidDataException("Geometry is a required property for GeoTaxLocations and cannot be null");
}
else
{
this.Geometry = Geometry;
}
this.PurchaseAmount = PurchaseAmount;
this.ObjectId = ObjectId;
}
/// <summary>
/// Gets or Sets Geometry
/// </summary>
[DataMember(Name="geometry", EmitDefaultValue=false)]
public Geometry Geometry { get; set; }
/// <summary>
/// Gets or Sets PurchaseAmount
/// </summary>
[DataMember(Name="purchaseAmount", EmitDefaultValue=false)]
public string PurchaseAmount { get; set; }
/// <summary>
/// Gets or Sets ObjectId
/// </summary>
[DataMember(Name="objectId", EmitDefaultValue=false)]
public string ObjectId { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class GeoTaxLocations {\n");
sb.Append(" Geometry: ").Append(Geometry).Append("\n");
sb.Append(" PurchaseAmount: ").Append(PurchaseAmount).Append("\n");
sb.Append(" ObjectId: ").Append(ObjectId).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as GeoTaxLocations);
}
/// <summary>
/// Returns true if GeoTaxLocations instances are equal
/// </summary>
/// <param name="other">Instance of GeoTaxLocations to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(GeoTaxLocations other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.Geometry == other.Geometry ||
this.Geometry != null &&
this.Geometry.Equals(other.Geometry)
) &&
(
this.PurchaseAmount == other.PurchaseAmount ||
this.PurchaseAmount != null &&
this.PurchaseAmount.Equals(other.PurchaseAmount)
) &&
(
this.ObjectId == other.ObjectId ||
this.ObjectId != null &&
this.ObjectId.Equals(other.ObjectId)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.Geometry != null)
hash = hash * 59 + this.Geometry.GetHashCode();
if (this.PurchaseAmount != null)
hash = hash * 59 + this.PurchaseAmount.GetHashCode();
if (this.ObjectId != null)
hash = hash * 59 + this.ObjectId.GetHashCode();
return hash;
}
}
}
}
| 35.770588 | 121 | 0.562243 | [
"Apache-2.0"
] | PitneyBowes/LocationIntelligenceSDK-CSharp | src/pb.locationIntelligence/Model/GeoTaxLocations.cs | 6,081 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DurableClientLibrary")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("DurableClientLibrary")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("59c9aaec-9eb3-475a-a5c5-de6d36ea0e2d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.675676 | 84 | 0.751223 | [
"Apache-2.0"
] | ShaneCastle/DurableSender | C#/DurableSenderLibrary/Properties/AssemblyInfo.cs | 1,434 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Linq;
namespace AltV.Net.Host.Diagnostics.Client.DiagnosticsClient
{
public sealed class EventPipeProvider
{
public EventPipeProvider(string name, EventLevel eventLevel, long keywords = 0, IDictionary<string, string> arguments = null)
{
Name = name;
EventLevel = eventLevel;
Keywords = keywords;
Arguments = arguments;
}
public long Keywords { get; }
public EventLevel EventLevel { get; }
public string Name { get; }
public IDictionary<string, string> Arguments { get; }
public override string ToString()
{
return $"{Name}:0x{Keywords:X16}:{(uint)EventLevel}{(Arguments == null ? "" : $":{GetArgumentString()}")}";
}
public override bool Equals(object obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}
return this == (EventPipeProvider)obj;
}
public override int GetHashCode()
{
int hash = 0;
hash ^= this.Name.GetHashCode();
hash ^= this.Keywords.GetHashCode();
hash ^= this.EventLevel.GetHashCode();
hash ^= GetArgumentString().GetHashCode();
return hash;
}
public static bool operator ==(EventPipeProvider left, EventPipeProvider right)
{
return left.ToString() == right.ToString();
}
public static bool operator !=(EventPipeProvider left, EventPipeProvider right)
{
return !(left == right);
}
internal string GetArgumentString()
{
if (Arguments == null)
{
return "";
}
return string.Join(";", Arguments.Select(a => $"{a.Key}={a.Value}"));
}
}
} | 29.567568 | 133 | 0.556216 | [
"MIT"
] | 51st-state/coreclr-module | api/AltV.Net.Host/Diagnostics.Client/DiagnosticsClient/EventPipeProvider.cs | 2,188 | C# |
using AntDesign.Pro.Layout;
using System;
using System.Net.Http;
using System.Threading.Tasks;
using HelloClaptrap.SimulatorWeb.Services;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Refit;
namespace HelloClaptrap.SimulatorWeb
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
var services = builder.Services;
services.AddScoped(
sp => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)});
services.AddAntDesign();
services.Configure<ProSettings>(builder.Configuration.GetSection("ProSettings"));
services.AddRefitClient<IAuctionApi>()
.ConfigureHttpClient(client => { client.BaseAddress = new Uri("http://localhost:38000"); });
await builder.Build().RunAsync();
}
}
} | 36.103448 | 108 | 0.675263 | [
"MIT"
] | Z4t4r/Newbe.Claptrap | src/Newbe.Claptrap.Template/HelloClaptrap/HelloClaptrap.SimulatorWeb/Program.cs | 1,047 | C# |
////////////////////////////////////////////////////////////////////////////////
//NUnit tests for "EF Core Provider for LCPI OLE DB"
// IBProvider and Contributors. 07.05.2021.
using System;
using System.Data;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using NUnit.Framework;
using xdb=lcpi.data.oledb;
namespace EFCore_LcpiOleDb_Tests.General.Work.DBMS.Firebird.V03_0_0.D1.Query.Operators.SET_001.Equal.Complete2__objs.Int32.Int32{
////////////////////////////////////////////////////////////////////////////////
using T_DATA1 =System.Int32;
using T_DATA2 =System.Int32;
////////////////////////////////////////////////////////////////////////////////
//class TestSet_504__param__01__VV
public static class TestSet_504__param__01__VV
{
private const string c_NameOf__TABLE ="DUAL";
private sealed class MyContext:TestBaseDbContext
{
[Table(c_NameOf__TABLE)]
public sealed class TEST_RECORD
{
[Key]
[Column("ID")]
public System.Int32? TEST_ID { get; set; }
};//class TEST_RECORD
//----------------------------------------------------------------------
public DbSet<TEST_RECORD> testTable { get; set; }
//----------------------------------------------------------------------
public MyContext(xdb.OleDbTransaction tr)
:base(tr)
{
}//MyContext
};//class MyContext
//-----------------------------------------------------------------------
[Test]
public static void Test_001__less()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
T_DATA1 vv1=3;
T_DATA2 vv2=4;
var recs=db.testTable.Where(r => ((object)vv1) /*OP{*/ == /*}OP*/ ((object)vv2));
foreach(var r in recs)
{
TestServices.ThrowSelectedRow();
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_V_0"));
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_001__less
//-----------------------------------------------------------------------
[Test]
public static void Test_002__equal()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
T_DATA1 vv1=4;
T_DATA2 vv2=4;
var recs=db.testTable.Where(r => ((object)vv1) /*OP{*/ == /*}OP*/ ((object)vv2));
int nRecs=0;
foreach(var r in recs)
{
Assert.AreEqual
(0,
nRecs);
++nRecs;
Assert.IsTrue
(r.TEST_ID.HasValue);
Assert.AreEqual
(1,
r.TEST_ID.Value);
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_V_0"));
Assert.AreEqual
(1,
nRecs);
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_002__equal
//-----------------------------------------------------------------------
[Test]
public static void Test_003__greater()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
T_DATA1 vv1=4;
T_DATA2 vv2=3;
var recs=db.testTable.Where(r => ((object)vv1) /*OP{*/ == /*}OP*/ ((object)vv2));
foreach(var r in recs)
{
TestServices.ThrowSelectedRow();
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_V_0"));
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_003__greater
//-----------------------------------------------------------------------
[Test]
public static void Test_ZA01NV()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
object vv1__null_obj=null;
T_DATA2 vv2=4;
var recs=db.testTable.Where(r => ((object)(T_DATA1)vv1__null_obj) /*OP{*/ == /*}OP*/ ((object)vv2));
foreach(var r in recs)
{
TestServices.ThrowSelectedRow();
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_V_0"));
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_ZA01NV
//-----------------------------------------------------------------------
[Test]
public static void Test_ZA02VN()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
T_DATA1 vv1=3;
object vv2__null_obj=null;
var recs=db.testTable.Where(r => ((object)vv1) /*OP{*/ == /*}OP*/ ((object)(T_DATA2)vv2__null_obj));
foreach(var r in recs)
{
TestServices.ThrowSelectedRow();
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_V_0"));
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_ZA02VN
//-----------------------------------------------------------------------
[Test]
public static void Test_ZA03NN()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
object vv1__null_obj=null;
object vv2__null_obj=null;
var recs=db.testTable.Where(r => ((object)(T_DATA1)vv1__null_obj) /*OP{*/ == /*}OP*/ ((object)(T_DATA2)vv2__null_obj));
int nRecs=0;
foreach(var r in recs)
{
Assert.AreEqual
(0,
nRecs);
++nRecs;
Assert.IsTrue
(r.TEST_ID.HasValue);
Assert.AreEqual
(1,
r.TEST_ID.Value);
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_V_0"));
Assert.AreEqual
(1,
nRecs);
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_ZA03NN
//-----------------------------------------------------------------------
[Test]
public static void Test_ZB01NV()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
object vv1__null_obj=null;
T_DATA2 vv2=4;
var recs=db.testTable.Where(r => !(((object)(T_DATA1)vv1__null_obj) /*OP{*/ == /*}OP*/ ((object)vv2)));
int nRecs=0;
foreach(var r in recs)
{
Assert.AreEqual
(0,
nRecs);
++nRecs;
Assert.IsTrue
(r.TEST_ID.HasValue);
Assert.AreEqual
(1,
r.TEST_ID.Value);
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_0"));
Assert.AreEqual
(1,
nRecs);
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_ZB01NV
//-----------------------------------------------------------------------
[Test]
public static void Test_ZB02VN()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
T_DATA1 vv1=3;
object vv2__null_obj=null;
var recs=db.testTable.Where(r => !(((object)vv1) /*OP{*/ == /*}OP*/ ((object)(T_DATA2)vv2__null_obj)));
int nRecs=0;
foreach(var r in recs)
{
Assert.AreEqual
(0,
nRecs);
++nRecs;
Assert.IsTrue
(r.TEST_ID.HasValue);
Assert.AreEqual
(1,
r.TEST_ID.Value);
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_0"));
Assert.AreEqual
(1,
nRecs);
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_ZB02VN
//-----------------------------------------------------------------------
[Test]
public static void Test_ZB03NN()
{
using(var cn=LocalCnHelper.CreateCn())
{
cn.Open();
using(var tr=cn.BeginTransaction())
{
//insert new record in external transaction
using(var db=new MyContext(tr))
{
object vv1__null_obj=null;
object vv2__null_obj=null;
var recs=db.testTable.Where(r => !(((object)(T_DATA1)vv1__null_obj) /*OP{*/ == /*}OP*/ ((object)(T_DATA2)vv2__null_obj)));
foreach(var r in recs)
{
TestServices.ThrowSelectedRow();
}//foreach r
db.CheckTextOfLastExecutedCommand
(new TestSqlTemplate()
.T("SELECT ").N("d","ID").EOL()
.T("FROM ").N(c_NameOf__TABLE).T(" AS ").N("d").EOL()
.T("WHERE ").P_BOOL("__Exec_V_0"));
}//using db
tr.Commit();
}//using tr
}//using cn
}//Test_ZB03NN
};//class TestSet_504__param__01__VV
////////////////////////////////////////////////////////////////////////////////
}//namespace EFCore_LcpiOleDb_Tests.General.Work.DBMS.Firebird.V03_0_0.D1.Query.Operators.SET_001.Equal.Complete2__objs.Int32.Int32
| 23.778291 | 131 | 0.526904 | [
"MIT"
] | ibprovider/Lcpi.EFCore.LcpiOleDb | Tests/General/Source/Work/DBMS/Firebird/V03_0_0/D1/Query/Operators/SET_001/Equal/Complete2__objs/Int32/Int32/TestSet_504__param__01__VV.cs | 10,298 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// <auto-generated/>
// Template Source: MethodRequestBuilder.cs.tt
namespace Microsoft.Graph
{
using System;
using System.Collections.Generic;
using System.IO;
/// <summary>
/// The type SynchronizationAcquireAccessTokenRequestBuilder.
/// </summary>
public partial class SynchronizationAcquireAccessTokenRequestBuilder : BaseActionMethodRequestBuilder<ISynchronizationAcquireAccessTokenRequest>, ISynchronizationAcquireAccessTokenRequestBuilder
{
/// <summary>
/// Constructs a new <see cref="SynchronizationAcquireAccessTokenRequestBuilder"/>.
/// </summary>
/// <param name="requestUrl">The URL for the request.</param>
/// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param>
/// <param name="credentials">A credentials parameter for the OData method call.</param>
public SynchronizationAcquireAccessTokenRequestBuilder(
string requestUrl,
IBaseClient client,
IEnumerable<SynchronizationSecretKeyStringValuePair> credentials)
: base(requestUrl, client)
{
this.SetParameter("credentials", credentials, true);
}
/// <summary>
/// A method used by the base class to construct a request class instance.
/// </summary>
/// <param name="functionUrl">The request URL to </param>
/// <param name="options">The query and header options for the request.</param>
/// <returns>An instance of a specific request class.</returns>
protected override ISynchronizationAcquireAccessTokenRequest CreateRequest(string functionUrl, IEnumerable<Option> options)
{
var request = new SynchronizationAcquireAccessTokenRequest(functionUrl, this.Client, options);
if (this.HasParameter("credentials"))
{
request.RequestBody.Credentials = this.GetParameter<IEnumerable<SynchronizationSecretKeyStringValuePair>>("credentials");
}
return request;
}
}
}
| 45.109091 | 198 | 0.636034 | [
"MIT"
] | GeertVL/msgraph-beta-sdk-dotnet | src/Microsoft.Graph/Generated/requests/SynchronizationAcquireAccessTokenRequestBuilder.cs | 2,481 | C# |
using NUnit.Framework;
using Shouldly;
using Translation.Client.Web.Models.Project;
using Translation.Common.Helpers;
using static Translation.Common.Tests.TestHelpers.FakeModelTestHelper;
using static Translation.Common.Tests.TestHelpers.AssertViewModelTestHelper;
using static Translation.Common.Tests.TestHelpers.FakeConstantTestHelper;
namespace Translation.Client.Web.Unit.Tests.Models.ViewModels.Project
{
[TestFixture]
public class ProjectDetailModelTests
{
public ProjectDetailModel SystemUnderTest { get; set; }
[SetUp]
public void run_before_every_test()
{
SystemUnderTest = GetOrganizationOneProjectOneDetailModel();
}
[Test]
public void ProjectCloneModel_Title()
{
Assert.AreEqual(SystemUnderTest.Title, "project_detail_title");
}
[Test]
public void ProjectCloneModel_OrganizationInput()
{
AssertHiddenInputModel(SystemUnderTest.OrganizationInput, "OrganizationUid");
}
[Test]
public void ProjectDetailModel_ProjectInput()
{
AssertHiddenInputModel(SystemUnderTest.ProjectInput, "ProjectUid");
}
[Test]
public void ProjectDetailModel_IsActiveInput()
{
AssertCheckboxInputModel(SystemUnderTest.IsActiveInput, "IsActive", "is_active", false, true);
}
[Test]
public void ProjectDetailModel_Parameter()
{
SystemUnderTest.LanguageName.ShouldBe(StringTwo);
SystemUnderTest.LanguageIconUrl.ShouldBe(HttpsUrl);
}
[Test]
public void ProjectCloneModel_SetInputModelValues()
{
// arrange
// act
SystemUnderTest.SetInputModelValues();
// assert
SystemUnderTest.OrganizationInput.Value.ShouldBe(SystemUnderTest.OrganizationUid.ToUidString());
SystemUnderTest.ProjectInput.Value.ShouldBe(SystemUnderTest.ProjectUid.ToUidString());
}
}
}
| 29.695652 | 108 | 0.668619 | [
"MIT"
] | VAndriyV/translation | Test/Translation.Client.Web.Unit.Tests/Models/ViewModels/Project/ProjectDetailModelTests.cs | 2,051 | C# |
namespace UILibrary.Win32.Struct
{
using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
public struct SCROLLBARINFO
{
public int cbSize;
public RECT rcScrollBar;
public int dxyLineButton;
public int xyThumbTop;
public int xyThumbBottom;
public int reserved;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=6)]
public int[] rgstate;
}
}
| 23.15 | 58 | 0.656587 | [
"Apache-2.0"
] | jxdong1013/archivems | pc/ArchiveMS/UILibrary/Win32/Struct/SCROLLBARINFO.cs | 465 | C# |
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using System;
using System.Collections.Generic;
namespace RapidField.SolidInstruments.Cryptography.Symmetric
{
/// <summary>
/// Represents a series of <see cref="ISymmetricKey" /> instances that constitute instructions for applying cascading encryption
/// and decryption.
/// </summary>
public interface ICascadingSymmetricKey : ICryptographicKey
{
/// <summary>
/// Gets the number of layers of encryption that a resulting transform will apply.
/// </summary>
public Int32 Depth
{
get;
}
/// <summary>
/// Gets the ordered array of keys comprising the cascading key.
/// </summary>
public IEnumerable<ISymmetricKey> Keys
{
get;
}
}
} | 36.875 | 133 | 0.490678 | [
"MIT"
] | RapidField/solid-instruments | src/RapidField.SolidInstruments.Cryptography/Symmetric/ICascadingSymmetricKey.cs | 1,182 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace MinecraftLauncher
{
/// <summary>
/// Interaction logic for NewsControl.xaml
/// </summary>
public partial class NewsControl : UserControl
{
public NewsControl()
{
InitializeComponent();
}
}
}
| 22.310345 | 50 | 0.720247 | [
"MIT"
] | Sergeeeek/MinecraftLauncher | MinecraftLauncher/NewsControl.xaml.cs | 649 | C# |
using Microsoft.AspNetCore.Hosting;
[assembly: HostingStartup(typeof(Journey.Web.Areas.Identity.IdentityHostingStartup))]
namespace Journey.Web.Areas.Identity
{
public class IdentityHostingStartup : IHostingStartup
{
public void Configure(IWebHostBuilder builder)
{
builder.ConfigureServices((context, services) => {
});
}
}
} | 25.933333 | 85 | 0.678663 | [
"MIT"
] | stefandenchev/Journey | Web/Journey.Web/Areas/Identity/IdentityHostingStartup.cs | 391 | C# |
using SharpData.Query;
namespace SharpData.Filters {
public class FilterCondition : Filter {
public CompareOperator CompareOperator { get; set; }
}
} | 22 | 54 | 0.766234 | [
"MIT"
] | JTOne123/sharpdata | SharpData/Filters/FilterCondition.cs | 154 | C# |
using System;
using System.Linq;
using FestivalManager.Entities.Contracts;
namespace FestivalManager.Core
{
using Contracts;
using Controllers.Contracts;
using IO.Contracts;
/// <summary>
/// by g0shk0
/// </summary>
public class Engine : IEngine
{
private readonly IReader reader;
private readonly IWriter writer;
private readonly IFestivalController festivalCоntroller;
private readonly ISetController setCоntroller;
public Engine(IReader reader, IWriter writer, IFestivalController festivalCоntroller, ISetController setCоntroller)
{
this.reader = reader;
this.writer = writer;
this.festivalCоntroller = festivalCоntroller;
this.setCоntroller = setCоntroller;
}
public void Run()
{
string input;
while ((input = reader.ReadLine()) != "END") // for job security
{
try
{
var result = this.ProcessCommand(input);
this.writer.WriteLine(result);
}
catch (InvalidOperationException ex) // in case we run out of memory
{
this.writer.WriteLine("ERROR: " + ex.Message);
}
}
var end = this.festivalCоntroller.ProduceReport();
this.writer.WriteLine("Results:");
this.writer.WriteLine(end);
}
public string ProcessCommand(string input)
{
var args = input.Split();
var command = args[0];
var parameters = args.Skip(1).ToArray();
string returnString = null;
switch (command)
{
case "LetsRock":
returnString = this.setCоntroller.PerformSets();
break;
case "RegisterSet":
returnString = this.festivalCоntroller.RegisterSet(parameters);
break;
case "SignUpPerformer":
returnString = this.festivalCоntroller.SignUpPerformer(parameters);
break;
case "RegisterSong":
returnString = this.festivalCоntroller.RegisterSong(parameters);
break;
case "AddSongToSet":
returnString = this.festivalCоntroller.AddSongToSet(parameters);
break;
case "AddPerformerToSet":
returnString = this.festivalCоntroller.AddPerformerToSet(parameters);
break;
case "RepairInstruments":
returnString = this.festivalCоntroller.RepairInstruments(parameters);
break;
default:
break;
}
return returnString;
}
}
} | 31.858696 | 123 | 0.529853 | [
"MIT"
] | GeorgiGarnenkov/CSharp-Fundamentals | C#OOPAdvanced/Exam/FestivalManager/Core/Engine.cs | 2,949 | C# |
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Text.Json;
namespace IdNet6
{
internal static class ObjectSerializer
{
private static readonly JsonSerializerOptions Options = new JsonSerializerOptions
{
IgnoreNullValues = true
};
public static string ToString(object o)
{
return JsonSerializer.Serialize(o, Options);
}
public static T FromString<T>(string value)
{
return JsonSerializer.Deserialize<T>(value, Options);
}
}
} | 26.884615 | 107 | 0.638054 | [
"Apache-2.0"
] | simple0x47/IdNet6 | src/IdNet6/src/Infrastructure/ObjectSerializer.cs | 701 | C# |
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using MongoDB.Driver;
using MyCompany.MyProject.Data;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MongoDB;
namespace MyCompany.MyProject.MongoDB
{
public class MongoDbMyProjectDbSchemaMigrator : IMyProjectDbSchemaMigrator , ITransientDependency
{
private readonly IServiceProvider _serviceProvider;
public MongoDbMyProjectDbSchemaMigrator(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public async Task MigrateAsync()
{
var dbContexts = _serviceProvider.GetServices<IAbpMongoDbContext>();
var connectionStringResolver = _serviceProvider.GetRequiredService<IConnectionStringResolver>();
foreach (var dbContext in dbContexts)
{
var connectionString =
await connectionStringResolver.ResolveAsync(
ConnectionStringNameAttribute.GetConnStringName(dbContext.GetType()));
var mongoUrl = new MongoUrl(connectionString);
var databaseName = mongoUrl.DatabaseName;
var client = new MongoClient(mongoUrl);
if (databaseName.IsNullOrWhiteSpace())
{
databaseName = ConnectionStringNameAttribute.GetConnStringName(dbContext.GetType());
}
(dbContext as AbpMongoDbContext)?.InitializeCollections(client.GetDatabase(databaseName));
}
}
}
}
| 35.733333 | 108 | 0.666667 | [
"MIT"
] | enisn/ABP-dotnet-template | templates/mvc/src/MyCompany.MyProject.MongoDB/MongoDb/MongoDbMyProjectDbSchemaMigrator.cs | 1,610 | C# |
using System;
using TeamControlium.Controlium;
namespace Internal.Tester
{
// This is a dummy Control, used to test the ControlBase class. This control simply maps to any HTML element.
public class ControlBaseTester : ControlBase
{
public ControlBaseTester(ObjectMappingDetails mapping)
{
SetRootElement(mapping);
}
public ControlBaseTester(string title)
{
SetRootElement(ObjectMap.Root_ByTitle_CaseSensitive.ResolveParameters(title));
}
public string Text
{
set
{
try
{
FindElement(ObjectMap.TextEntryBox).Clear().SetText(value);
}
catch (Exception ex)
{
throw new UnableToSetOrGetText(ObjectMap.TextEntryBox, $"Error finding, clearing or setting text [{value}] in [{RootElement.Mapping.FriendlyName}]", ex);
}
}
get
{
try
{
return FindElement(ObjectMap.TextEntryBox).GetAttribute("value");
}
catch (Exception ex)
{
throw new UnableToSetOrGetText(ObjectMap.TextEntryBox, $"Error finding or getting text from textbox in [{RootElement.Mapping.FriendlyName}]", ex);
}
}
}
public class ObjectMap
{
public static ObjectMappingDetails Root_ByTitle_CaseSensitive => new ObjectMappingDetails(".//div[./input[@name='q' and @title='{0}']]", "Input Textbox with title [{0}] (Case sensitive)");
public static ObjectMappingDetails TextEntryBox => new ObjectMappingDetails("./input[@name='q']", "Input Textbox text entry box");
public static ObjectMappingDetails Div => new ObjectMappingDetails("./div[@class='gsfi']", "Input Textbox gsfi");
public static ObjectMappingDetails Input1 => new ObjectMappingDetails("./input[@id='gs_taif0']", "Input Textbox taif");
public static ObjectMappingDetails Input2 => new ObjectMappingDetails("./input[@id='gs_htif0']", "Input Textbox htif");
}
}
} | 38.362069 | 200 | 0.582472 | [
"MIT"
] | TeamControlium/Controlium.net | Controlium.UnitTests.net/Drivers/ControlBaseTester.cs | 2,227 | C# |
using Chloe.DbExpressions;
namespace Chloe.MySql.MethodHandlers
{
class AddMinutes_Handler : IMethodHandler
{
public bool CanProcess(DbMethodCallExpression exp)
{
if (exp.Method.DeclaringType != PublicConstants.TypeOfDateTime)
return false;
return true;
}
public void Process(DbMethodCallExpression exp, SqlGenerator generator)
{
SqlGenerator.DbFunction_DATEADD(generator, "MINUTE", exp);
}
}
}
| 25.5 | 79 | 0.633333 | [
"MIT"
] | panda-big/Chloe | src/Chloe.MySql/MethodHandlers/AddMinutes_Handler.cs | 512 | C# |
using System;
using System.Collections.Generic;
using Grasshopper.Kernel;
using Rhino.Geometry;
using Grasshopper.Kernel.Types;
using System.Drawing;
using Macaw.Utilities.Channels;
using Grasshopper.Kernel.Parameters;
namespace Macaw_GH.Filtering.Extract
{
public class GetPixelValues : GH_Component
{
public int ModeIndex = 0;
private string[] modes = { "Color", "Alpha", "Red", "Green", "Blue", "Hue", "Saturation", "Brightness" };
/// <summary>
/// Initializes a new instance of the DeconstructARGB class.
/// </summary>
public GetPixelValues()
: base("Get Values", "Values", "---", "Aviary", "Bitmap Build")
{
UpdateMessage();
}
/// <summary>
/// Registers all the input parameters for this component.
/// </summary>
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
pManager.AddGenericParameter("Bitmap", "B", "---", GH_ParamAccess.item);
pManager.AddIntegerParameter("Mode", "M", "---", GH_ParamAccess.item, 0);
pManager[1].Optional = true;
Param_Integer param = (Param_Integer)Params.Input[1];
param.AddNamedValue(modes[0], 0);
param.AddNamedValue(modes[1], 1);
param.AddNamedValue(modes[2], 2);
param.AddNamedValue(modes[3], 3);
param.AddNamedValue(modes[4], 4);
param.AddNamedValue(modes[5], 5);
param.AddNamedValue(modes[6], 6);
param.AddNamedValue(modes[7], 7);
}
/// <summary>
/// Registers all the output parameters for this component.
/// </summary>
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
{
pManager.AddGenericParameter("Values", "V", "---", GH_ParamAccess.list);
}
/// <summary>
/// This is the method that actually does the work.
/// </summary>
/// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
protected override void SolveInstance(IGH_DataAccess DA)
{
// Declare variables
IGH_Goo Z = null;
int M = 0;
// Access the input parameters
if (!DA.GetData(0, ref Z)) return;
if (!DA.GetData(1, ref M)) return;
if (M != ModeIndex)
{
ModeIndex = M;
UpdateMessage();
}
Bitmap A = new Bitmap(10,10);
if (Z != null) { Z.CastTo(out A); }
mGetChannel C = null;
switch(M)
{
default:
C = new mGetRGBColor(A);
break;
case 1:
C = new mGetAlpha(A);
break;
case 2:
C = new mGetRed(A);
break;
case 3:
C = new mGetGreen(A);
break;
case 4:
C = new mGetBlue(A);
break;
case 5:
C = new mGetHue(A);
break;
case 6:
C = new mGetSaturation(A);
break;
case 7:
C = new mGetBrightness(A);
break;
}
if (M == 0)
{
DA.SetDataList(0, C.Colors);
}
else
{
DA.SetDataList(0, C.Values);
}
}
private void UpdateMessage()
{
Message = modes[ModeIndex];
}
/// <summary>
/// Set Exposure level for the component.
/// </summary>
public override GH_Exposure Exposure
{
get { return GH_Exposure.tertiary; }
}
/// <summary>
/// Provides an Icon for the component.
/// </summary>
protected override System.Drawing.Bitmap Icon
{
get
{
return Properties.Resources.Macaw_Deconstruct_RGB;
}
}
/// <summary>
/// Gets the unique ID for this component. Do not change this ID after release.
/// </summary>
public override Guid ComponentGuid
{
get { return new Guid("f21b4117-c50a-4df7-a5bc-ba937c1eb9ee"); }
}
}
} | 30.264901 | 113 | 0.48709 | [
"MIT"
] | cdriesler/Aviary | Macaw_GH/Utilities/GetPixelValues.cs | 4,572 | C# |
/***************************************************************
//This code just called you a tool
//What I meant to say is that this code was generated by a tool
//so don't mess with it unless you're debugging
//subject to change without notice, might regenerate while you're reading, etc
***************************************************************/
using Web;
using Voodoo.Messages;
using Web.Infrastructure.ExecutionPipeline;
using Web.Infrastructure.ExecutionPipeline.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Voodoo;
using Core.Operations.Users;
using Core.Operations.Users.Extras;
using Core.Operations.TestClasses;
using Core.Operations.TestClasses.Extras;
using Core.Operations.Teams;
using Core.Operations.Teams.Extras;
using Core.Operations.Projects;
using Core.Operations.Projects.Extras;
using Core.Operations.Members;
using Core.Operations.Members.Extras;
using Core.Operations.Lists;
using Core.Operations.Errors;
using Core.Operations.Errors.Extras;
using Core.Operations.CurrentUsers;
using Core.Identity;
using Core.Operations.ApplicationSettings;
using Core.Operations.ApplicationSettings.Extras;
namespace Web.Controllers.Api
{
[Route("api/[controller]")]
public class UserController : ApiControllerBase
{
[HttpDelete]
public async Task<Response> Delete
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response>
{
Command = new UserDeleteCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { "Administrator" } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpGet]
public async Task<Response<UserDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<UserDetail>>
{
Command = new UserDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { "Administrator" } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<UserDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpPut]
public async Task<NewItemResponse> Put
([FromBody] UserDetail request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<UserDetail, NewItemResponse>
{
Command = new UserSaveCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { "Administrator" } }
};
var pipeline = new ExcecutionPipeline<UserDetail, NewItemResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class UserListController : ApiControllerBase
{
[HttpGet]
public async Task<UserListResponse> Get
( UserListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<UserListRequest, UserListResponse>
{
Command = new UserListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { "Administrator" } }
};
var pipeline = new ExcecutionPipeline<UserListRequest, UserListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class TestClassController : ApiControllerBase
{
[HttpDelete]
public async Task<Response> Delete
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response>
{
Command = new TestClassDeleteCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpGet]
public async Task<Response<TestClassDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<TestClassDetail>>
{
Command = new TestClassDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<TestClassDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpPost]
public async Task<NewItemResponse> Post
([FromBody] TestClassDetail request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<TestClassDetail, NewItemResponse>
{
Command = new TestClassSaveCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<TestClassDetail, NewItemResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class TestClassListController : ApiControllerBase
{
[HttpGet]
public async Task<TestClassListResponse> Get
( TestClassListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<TestClassListRequest, TestClassListResponse>
{
Command = new TestClassListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<TestClassListRequest, TestClassListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class TeamController : ApiControllerBase
{
[HttpDelete]
public async Task<Response> Delete
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response>
{
Command = new TeamDeleteCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpGet]
public async Task<Response<TeamDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<TeamDetail>>
{
Command = new TeamDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<TeamDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpPut]
public async Task<NewItemResponse> Put
([FromBody] TeamDetail request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<TeamDetail, NewItemResponse>
{
Command = new TeamSaveCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<TeamDetail, NewItemResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class TeamListController : ApiControllerBase
{
[HttpGet]
public async Task<TeamListResponse> Get
( TeamListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<TeamListRequest, TeamListResponse>
{
Command = new TeamListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<TeamListRequest, TeamListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ProjectController : ApiControllerBase
{
[HttpDelete]
public async Task<Response> Delete
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response>
{
Command = new ProjectDeleteCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpGet]
public async Task<Response<ProjectDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<ProjectDetail>>
{
Command = new ProjectDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<ProjectDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpPut]
public async Task<NewItemResponse> Put
([FromBody] ProjectDetail request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<ProjectDetail, NewItemResponse>
{
Command = new ProjectSaveCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<ProjectDetail, NewItemResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ProjectListController : ApiControllerBase
{
[HttpGet]
public async Task<ProjectListResponse> Get
( ProjectListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<ProjectListRequest, ProjectListResponse>
{
Command = new ProjectListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<ProjectListRequest, ProjectListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class MemberController : ApiControllerBase
{
[HttpDelete]
public async Task<Response> Delete
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response>
{
Command = new MemberDeleteCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpGet]
public async Task<Response<MemberDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<MemberDetail>>
{
Command = new MemberDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<MemberDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpPut]
public async Task<NewItemResponse> Put
([FromBody] MemberDetail request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<MemberDetail, NewItemResponse>
{
Command = new MemberSaveCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<MemberDetail, NewItemResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class MemberListController : ApiControllerBase
{
[HttpGet]
public async Task<MemberListResponse> Get
( MemberListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<MemberListRequest, MemberListResponse>
{
Command = new MemberListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<MemberListRequest, MemberListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ListsController : ApiControllerBase
{
[HttpGet]
public async Task<ListsResponse> Get
( ListsRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<ListsRequest, ListsResponse>
{
Command = new LookupsQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<ListsRequest, ListsResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ErrorLogController : ApiControllerBase
{
[HttpGet]
public async Task<Response<ErrorDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<ErrorDetail>>
{
Command = new ErrorDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<ErrorDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ErrorLogListController : ApiControllerBase
{
[HttpGet]
public async Task<ErrorListResponse> Get
( ErrorListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<ErrorListRequest, ErrorListResponse>
{
Command = new ErrorListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<ErrorListRequest, ErrorListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class MobileErrorController : ApiControllerBase
{
[HttpPost]
public async Task<Response> Post
([FromBody] MobileErrorRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<MobileErrorRequest, Response>
{
Command = new MobileErrorAddCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = true, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<MobileErrorRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class CurrentUserController : ApiControllerBase
{
[HttpGet]
public async Task<Response<AppPrincipal>> Get
( EmptyRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<EmptyRequest, Response<AppPrincipal>>
{
Command = new GetCurrentUserCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = true, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<EmptyRequest, Response<AppPrincipal>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ApplicationSettingController : ApiControllerBase
{
[HttpDelete]
public async Task<Response> Delete
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response>
{
Command = new ApplicationSettingDeleteCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpGet]
public async Task<Response<ApplicationSettingDetail>> Get
( IdRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<IdRequest, Response<ApplicationSettingDetail>>
{
Command = new ApplicationSettingDetailQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<IdRequest, Response<ApplicationSettingDetail>>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
[HttpPut]
public async Task<NewItemResponse> Put
([FromBody] ApplicationSettingDetail request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<ApplicationSettingDetail, NewItemResponse>
{
Command = new ApplicationSettingSaveCommand(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<ApplicationSettingDetail, NewItemResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
[Route("api/[controller]")]
public class ApplicationSettingListController : ApiControllerBase
{
[HttpGet]
public async Task<ApplicationSettingListResponse> Get
( ApplicationSettingListRequest request)
{
var state = new Infrastructure.ExecutionPipeline.Models.ExecutionState
<ApplicationSettingListRequest, ApplicationSettingListResponse>
{
Command = new ApplicationSettingListQuery(request),
Context = HttpContext,
ModelState = ModelState,
Request = request,
SecurityContext = new SecurityContext { AllowAnonymouse = false, Roles=new string[] { } }
};
var pipeline = new ExcecutionPipeline<ApplicationSettingListRequest, ApplicationSettingListResponse>
(state);
await pipeline.ExecuteAsync();
return state.Response;
}
}
}
| 38.383308 | 121 | 0.577394 | [
"MIT"
] | MiniverCheevy/spa-starter-kit | src/React/Controllers/Api/Api.generated.cs | 24,834 | C# |
using Discord.Commands;
using Discord.WebSocket;
namespace RachelBot.Preconditions;
public class RequireHigherPositionAttribute : PreconditionAttribute
{
public override Task<PreconditionResult> CheckPermissionsAsync(ICommandContext context, CommandInfo command, IServiceProvider services)
{
SocketGuildUser user = (SocketGuildUser)context.User;
SocketGuildUser bot = (SocketGuildUser)context.Guild.GetUserAsync(context.Client.CurrentUser.Id).GetAwaiter().GetResult();
if (bot.Hierarchy > user.Hierarchy)
{
return Task.FromResult(PreconditionResult.FromSuccess());
}
return Task.FromResult(PreconditionResult.FromError($"Insufficient Permissions"));
}
}
| 34.809524 | 139 | 0.749658 | [
"MIT"
] | JerzyKruszewski/RachelDiscordBot | RachelBot/Preconditions/RequireHigherPositionAttribute.cs | 733 | C# |
namespace Xilium.CefGlue
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Xilium.CefGlue.Interop;
/// <summary>
/// Class used to implement browser process callbacks. The methods of this class
/// will be called on the browser process main thread unless otherwise indicated.
/// </summary>
public abstract unsafe partial class CefBrowserProcessHandler
{
private void on_context_initialized(cef_browser_process_handler_t* self)
{
CheckSelf(self);
OnContextInitialized();
}
/// <summary>
/// Called on the browser process UI thread immediately after the CEF context
/// has been initialized.
/// </summary>
protected virtual void OnContextInitialized()
{
}
private void on_before_child_process_launch(cef_browser_process_handler_t* self, cef_command_line_t* command_line)
{
CheckSelf(self);
var m_commandLine = CefCommandLine.FromNative(command_line);
OnBeforeChildProcessLaunch(m_commandLine);
m_commandLine.Dispose();
}
/// <summary>
/// Called before a child process is launched. Will be called on the browser
/// process UI thread when launching a render process and on the browser
/// process IO thread when launching a GPU or plugin process. Provides an
/// opportunity to modify the child process command line. Do not keep a
/// reference to |command_line| outside of this method.
/// </summary>
protected virtual void OnBeforeChildProcessLaunch(CefCommandLine commandLine)
{
}
private void on_render_process_thread_created(cef_browser_process_handler_t* self, cef_list_value_t* extra_info)
{
CheckSelf(self);
var mExtraInfo = CefListValue.FromNative(extra_info);
OnRenderProcessThreadCreated(mExtraInfo);
mExtraInfo.Dispose();
}
/// <summary>
/// Called on the browser process IO thread after the main thread has been
/// created for a new render process. Provides an opportunity to specify extra
/// information that will be passed to
/// CefRenderProcessHandler::OnRenderThreadCreated() in the render process. Do
/// not keep a reference to |extra_info| outside of this method.
/// </summary>
protected virtual void OnRenderProcessThreadCreated(CefListValue extraInfo)
{
}
private cef_print_handler_t* get_print_handler(cef_browser_process_handler_t* self)
{
CheckSelf(self);
var result = GetPrintHandler();
return result != null ? result.ToNative() : null;
}
/// <summary>
/// Return the handler for printing on Linux. If a print handler is not
/// provided then printing will not be supported on the Linux platform.
/// </summary>
protected virtual CefPrintHandler GetPrintHandler()
{
return null;
}
}
}
| 35.366667 | 122 | 0.641847 | [
"MIT"
] | git-thinh/Xilium.CefGlue-lvcef-39.0 | xilium.cefglue/CefGlue/Classes.Handlers/CefBrowserProcessHandler.cs | 3,183 | C# |
using System;
using System.Collections.Generic;
using System.Net;
using System.Security.Authentication;
using Mirror;
using UnityEngine;
using UnityEngine.Serialization;
namespace JamesFrowen.SimpleWeb.Tests
{
public static class SimpleWebTransportExtension
{
/// <summary>
/// Create copy of array, need to do this because buffers are re-used
/// </summary>
/// <param name="_"></param>
/// <param name="segment"></param>
/// <returns></returns>
public static byte[] CreateCopy(this SimpleWebTransport _, ArraySegment<byte> segment)
{
byte[] copy = new byte[segment.Count];
Array.Copy(segment.Array, segment.Offset, copy, 0, segment.Count);
return copy;
}
}
interface NeedInitTestInstance
{
void Init();
}
public class ServerTestInstance : SimpleWebTransport, NeedInitTestInstance
{
public readonly List<int> onConnect = new List<int>();
public readonly List<int> onDisconnect = new List<int>();
public readonly List<(int connId, byte[] data)> onData = new List<(int connId, byte[] data)>();
public readonly List<(int connId, Exception exception)> onError = new List<(int connId, Exception exception)>();
public void Init()
{
base.OnServerConnected = (connId) => onConnect.Add(connId);
base.OnServerDisconnected = (connId) => onDisconnect.Add(connId);
base.OnServerDataReceived = (connId, data, _) => onData.Add((connId, this.CreateCopy(data)));
base.OnServerError = (connId, exception) => onError.Add((connId, exception));
}
public WaitUntil WaitForConnection => new WaitUntil(() => onConnect.Count >= 1);
public void ServerSend(System.Collections.Generic.List<int> connectionIds, int channelId, ArraySegment<byte> segment)
{
foreach (int id in connectionIds)
{
ServerSend(id, channelId, segment);
}
}
}
public class ClientTestInstance : SimpleWebTransport, NeedInitTestInstance
{
public int onConnect = 0;
public int onDisconnect = 0;
public readonly List<byte[]> onData = new List<byte[]>();
public readonly List<Exception> onError = new List<Exception>();
public void Init()
{
base.OnClientConnected = () => onConnect++;
base.OnClientDisconnected = () => onDisconnect++;
base.OnClientDataReceived = (data, _) => onData.Add(this.CreateCopy(data));
base.OnClientError = (exception) => onError.Add(exception);
}
public WaitUntil WaitForConnect => new WaitUntil(() => onConnect >= 1);
}
}
namespace JamesFrowen.SimpleWeb
{
public class SimpleWebTransport : Transport
{
public const string NormalScheme = "ws";
public const string SecureScheme = "wss";
[Tooltip("Port to use for server and client")]
public ushort port = 7778;
[Tooltip("Protect against allocation attacks by keeping the max message size small. Otherwise an attacker might send multiple fake packets with 2GB headers, causing the server to run out of memory after allocating multiple large packets.")]
public int maxMessageSize = 16 * 1024;
[Tooltip("Max size for http header send as handshake for websockets")]
public int handshakeMaxSize = 3000;
[Tooltip("disables nagle algorithm. lowers CPU% and latency but increases bandwidth")]
public bool noDelay = true;
[Tooltip("Send would stall forever if the network is cut off during a send, so we need a timeout (in milliseconds)")]
public int sendTimeout = 5000;
[Tooltip("How long without a message before disconnecting (in milliseconds)")]
public int receiveTimeout = 20000;
[Tooltip("Caps the number of messages the server will process per tick. Allows LateUpdate to finish to let the reset of unity contiue incase more messages arrive before they are processed")]
public int serverMaxMessagesPerTick = 10000;
[Tooltip("Caps the number of messages the client will process per tick. Allows LateUpdate to finish to let the reset of unity contiue incase more messages arrive before they are processed")]
public int clientMaxMessagesPerTick = 1000;
[Header("Server settings")]
[Tooltip("Groups messages in queue before calling Stream.Send")]
public bool batchSend = true;
[Tooltip("Waits for 1ms before grouping and sending messages. " +
"This gives time for mirror to finish adding message to queue so that less groups need to be made. " +
"If WaitBeforeSend is true then BatchSend Will also be set to true")]
public bool waitBeforeSend = false;
[Header("Ssl Settings")]
[Tooltip("Sets connect scheme to wss. Useful when client needs to connect using wss when TLS is outside of transport, NOTE: if sslEnabled is true clientUseWss is also true")]
public bool clientUseWss;
public bool sslEnabled;
[Tooltip("Path to json file that contains path to cert and its password\n\nUse Json file so that cert password is not included in client builds\n\nSee cert.example.Json")]
public string sslCertJson = "./cert.json";
public SslProtocols sslProtocols = SslProtocols.Tls12;
[Header("Debug")]
[Tooltip("Log functions uses ConditionalAttribute which will effect which log methods are allowed. DEBUG allows warn/error, SIMPLEWEB_LOG_ENABLED allows all")]
[FormerlySerializedAs("logLevels")]
[SerializeField] Log.Levels _logLevels = Log.Levels.none;
/// <summary>
/// <para>Gets _logLevels field</para>
/// <para>Sets _logLevels and Log.level fields</para>
/// </summary>
public Log.Levels LogLevels
{
get => _logLevels;
set
{
_logLevels = value;
Log.level = _logLevels;
}
}
void OnValidate()
{
if (maxMessageSize > ushort.MaxValue)
{
Debug.LogWarning($"max supported value for maxMessageSize is {ushort.MaxValue}");
maxMessageSize = ushort.MaxValue;
}
Log.level = _logLevels;
}
public SimpleWebClient client;
public SimpleWebServer server;
TcpConfig TcpConfig => new TcpConfig(noDelay, sendTimeout, receiveTimeout);
public override bool Available()
{
return true;
}
public override int GetMaxPacketSize(int channelId = 0)
{
return maxMessageSize;
}
void Awake()
{
Log.level = _logLevels;
}
public override void Shutdown()
{
client?.Disconnect();
client = null;
server?.Stop();
server = null;
}
void LateUpdate()
{
ProcessMessages();
}
/// <summary>
/// Processes message in server and client queues
/// <para>Invokes OnData events allowing mirror to handle messages (Cmd/SyncVar/etc)</para>
/// <para>Called within LateUpdate, Can be called by user to process message before important logic</para>
/// </summary>
public void ProcessMessages()
{
server?.ProcessMessageQueue(this);
client?.ProcessMessageQueue(this);
}
#region Client
string GetClientScheme() => (sslEnabled || clientUseWss) ? SecureScheme : NormalScheme;
string GetServerScheme() => sslEnabled ? SecureScheme : NormalScheme;
public override bool ClientConnected()
{
// not null and not NotConnected (we want to return true if connecting or disconnecting)
return client != null && client.ConnectionState != ClientState.NotConnected;
}
public override void ClientConnect(string hostname)
{
// connecting or connected
if (ClientConnected())
{
Debug.LogError("Already Connected");
return;
}
var builder = new UriBuilder
{
Scheme = GetClientScheme(),
Host = hostname,
Port = port
};
client = SimpleWebClient.Create(maxMessageSize, clientMaxMessagesPerTick, TcpConfig);
if (client == null) { return; }
client.onConnect += OnClientConnected.Invoke;
client.onDisconnect += () =>
{
OnClientDisconnected.Invoke();
// clear client here after disconnect event has been sent
// there should be no more messages after disconnect
client = null;
};
client.onData += (ArraySegment<byte> data) => OnClientDataReceived.Invoke(data, Channels.DefaultReliable);
client.onError += (Exception e) =>
{
OnClientError.Invoke(e);
ClientDisconnect();
};
client.Connect(builder.Uri);
}
public override void ClientDisconnect()
{
// dont set client null here of messages wont be processed
client?.Disconnect();
}
public override void ClientSend(int channelId, ArraySegment<byte> segment)
{
if (!ClientConnected())
{
Debug.LogError("Not Connected");
return;
}
if (segment.Count > maxMessageSize)
{
Log.Error("Message greater than max size");
return;
}
if (segment.Count == 0)
{
Log.Error("Message count was zero");
return;
}
client.Send(segment);
}
#endregion
#region Server
public override bool ServerActive()
{
return server != null && server.Active;
}
public override void ServerStart()
{
if (ServerActive())
{
Debug.LogError("SimpleWebServer Already Started");
}
SslConfig config = SslConfigLoader.Load(sslEnabled, sslCertJson, sslProtocols);
server = new SimpleWebServer(serverMaxMessagesPerTick, TcpConfig, maxMessageSize, handshakeMaxSize, config);
server.onConnect += OnServerConnected.Invoke;
server.onDisconnect += OnServerDisconnected.Invoke;
server.onData += (int connId, ArraySegment<byte> data) => OnServerDataReceived.Invoke(connId, data, Channels.DefaultReliable);
server.onError += OnServerError.Invoke;
SendLoopConfig.batchSend = batchSend || waitBeforeSend;
SendLoopConfig.sleepBeforeSend = waitBeforeSend;
server.Start(port);
}
public override void ServerStop()
{
if (!ServerActive())
{
Debug.LogError("SimpleWebServer Not Active");
}
server.Stop();
server = null;
}
public override bool ServerDisconnect(int connectionId)
{
if (!ServerActive())
{
Debug.LogError("SimpleWebServer Not Active");
return false;
}
return server.KickClient(connectionId);
}
public override void ServerSend(int connectionId, int channelId, ArraySegment<byte> segment)
{
if (!ServerActive())
{
Debug.LogError("SimpleWebServer Not Active");
return;
}
if (segment.Count > maxMessageSize)
{
Log.Error("Message greater than max size");
return;
}
if (segment.Count == 0)
{
Log.Error("Message count was zero");
return;
}
server.SendOne(connectionId, segment);
return;
}
public override string ServerGetClientAddress(int connectionId)
{
return server.GetClientAddress(connectionId);
}
public override Uri ServerUri()
{
var builder = new UriBuilder
{
Scheme = GetServerScheme(),
Host = Dns.GetHostName(),
Port = port
};
return builder.Uri;
}
#endregion
}
}
| 34.643052 | 248 | 0.582743 | [
"MIT"
] | trisadmeslek/SimpleWebTransport | tests/Runtime/TestInstances.cs | 12,714 | C# |
#if !NETSTANDARD
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using FileHelpers.Dynamic;
using FileHelpers.Options;
namespace FileHelpers
{
/// <summary>A class to read generic CSV files delimited for any char.</summary>
[DebuggerDisplay("CsvEngine. ErrorMode: {ErrorManager.ErrorMode.ToString()}. Encoding: {Encoding.EncodingName}")]
public sealed class CsvEngine : FileHelperEngine
{
#region " Static Methods "
/// <summary>Reads a CSV File and return their contents as DataTable (The file must have the field names in the first row)</summary>
/// <param name="delimiter">The delimiter for each field</param>
/// <param name="filename">The file to read.</param>
/// <returns>The contents of the file as a DataTable</returns>
public static DataTable CsvToDataTable(string filename, char delimiter)
{
return CsvToDataTable(filename, "RecorMappingClass", delimiter, true);
}
/// <summary>
/// Reads a CSV File and return their contents as DataTable
/// (The file must have the field names in the first
/// row)
/// </summary>
/// <param name="classname">The name of the record class</param>
/// <param name="delimiter">The delimiter for each field</param>
/// <param name="filename">The file to read.</param>
/// <returns>The contents of the file as a DataTable</returns>
public static DataTable CsvToDataTable(string filename, string classname, char delimiter)
{
return CsvToDataTable(filename, classname, delimiter, true);
}
/// <summary>
/// Reads a CSV File and return their contents as DataTable
/// </summary>
/// <param name="classname">The name of the record class</param>
/// <param name="delimiter">The delimiter for each field</param>
/// <param name="filename">The file to read.</param>
/// <param name="hasHeader">Indicates if the file contains a header with the field names.</param>
/// <returns>The contents of the file as a DataTable</returns>
public static DataTable CsvToDataTable(string filename, string classname, char delimiter, bool hasHeader)
{
var options = new CsvOptions(classname, delimiter, filename);
if (hasHeader == false)
options.HeaderLines = 0;
return CsvToDataTable(filename, options);
}
/// <summary>
/// Reads a CSV File and return their contents as DataTable
/// </summary>
/// <param name="classname">The name of the record class</param>
/// <param name="delimiter">The delimiter for each field</param>
/// <param name="filename">The file to read.</param>
/// <param name="hasHeader">Indicates if the file contains a header with the field names.</param>
/// <param name="ignoreEmptyLines">Indicates if blank lines in the file should not be included in the returned DataTable</param>
/// <returns>The contents of the file as a DataTable</returns>
public static DataTable CsvToDataTable(string filename,
string classname,
char delimiter,
bool hasHeader,
bool ignoreEmptyLines)
{
var options = new CsvOptions(classname, delimiter, filename);
if (hasHeader == false)
options.HeaderLines = 0;
options.IgnoreEmptyLines = ignoreEmptyLines;
return CsvToDataTable(filename, options);
}
/// <summary>
/// Reads a CSV File and return their contents as
/// DataTable
/// </summary>
/// <param name="filename">The file to read.</param>
/// <param name="options">The options used to create the record mapping class.</param>
/// <returns>The contents of the file as a DataTable</returns>
public static DataTable CsvToDataTable(string filename, CsvOptions options)
{
var engine = new CsvEngine(options);
#pragma warning disable 618
return engine.ReadFileAsDT(filename);
#pragma warning restore 618
}
/// <summary>
/// Simply dumps the DataTable contents to a delimited file
/// using a ',' as delimiter.
/// </summary>
/// <param name="dt">The source Data Table</param>
/// <param name="filename">The destination file.</param>
public static void DataTableToCsv(DataTable dt, string filename)
{
DataTableToCsv(dt, filename, new CsvOptions("Tempo1", ',', dt.Columns.Count));
}
/// <summary>
/// Simply dumps the DataTable contents to a delimited file using
/// <paramref name="delimiter"/> as delimiter.
/// </summary>
/// <param name="dt">The source Data Table</param>
/// <param name="filename">The destination file.</param>
/// <param name="delimiter">The delimiter to be used on the file</param>
public static void DataTableToCsv(DataTable dt, string filename, char delimiter)
{
DataTableToCsv(dt, filename, new CsvOptions("Tempo1", delimiter, dt.Columns.Count));
}
/// <summary>
/// Simply dumps the DataTable contents to a delimited file. Only
/// allows to set the delimiter.
/// </summary>
/// <param name="dt">The source Data Table</param>
/// <param name="filename">The destination file.</param>
/// <param name="options">The options used to write the file</param>
public static void DataTableToCsv(DataTable dt, string filename, CsvOptions options)
{
using (var fs = new StreamWriter(filename, false, options.Encoding, DefaultWriteBufferSize)) {
// output header
if (options.IncludeHeaderNames)
{
var columnNames = new List<object>();
foreach (DataColumn dataColumn in dt.Columns)
{
columnNames.Add(dataColumn.ColumnName);
}
Append(fs, options, columnNames);
}
foreach (DataRow dr in dt.Rows)
{
object[] fields = dr.ItemArray;
Append(fs, options, fields);
}
fs.Close();
}
}
#endregion
#region " Constructor "
/// <summary>
/// <para>Create a CsvEngine using the specified sample file with their headers.</para>
/// <para>With this constructor will ignore the first line of the file. Use CsvOptions overload.</para>
/// </summary>
/// <param name="className">The name of the record class</param>
/// <param name="delimiter">The delimiter for each field</param>
/// <param name="sampleFile">A sample file with a header that contains the names of the fields.</param>
public CsvEngine(string className, char delimiter, string sampleFile)
: this(new CsvOptions(className, delimiter, sampleFile)) {}
/// <summary>
/// <para>Create a CsvEngine using the specified number of fields.</para>
/// <para>With this constructor will ignore the first line of the file. Use CsvOptions overload.</para>
/// </summary>
/// <param name="className">The name of the record class</param>
/// <param name="delimiter">The delimiter for each field</param>
/// <param name="numberOfFields">The number of fields of each record</param>
public CsvEngine(string className, char delimiter, int numberOfFields)
: this(new CsvOptions(className, delimiter, numberOfFields)) {}
/// <summary>
/// Create a CsvEngine using the specified sample file with
/// their headers.
/// </summary>
/// <param name="options">The options used to create the record mapping class.</param>
public CsvEngine(CsvOptions options)
: base(GetMappingClass(options)) {}
#endregion
private static Type GetMappingClass(CsvOptions options)
{
var cb = new CsvClassBuilder(options);
return cb.CreateRecordClass();
}
private static void Append(TextWriter fs, CsvOptions options, IList<object> fields)
{
for (int i = 0; i < fields.Count; i++)
{
if (i > 0)
{
fs.Write(options.Delimiter);
}
fs.Write(options.ValueToString(fields[i]));
}
fs.Write(Environment.NewLine);
}
}
}
#endif
| 44.771144 | 141 | 0.586176 | [
"MIT"
] | DillonBroadus/FileHelpers | FileHelpers/Dynamic/CsvEngine.cs | 8,999 | C# |
using System.IO;
using Microsoft.Data.SqlClient;
namespace Signum.Engine.Disconnected;
public class LocalBackupManager
{
public virtual void RestoreLocalDatabase(string connectionString, string backupFile, string databaseFile, string databaseLogFile)
{
FileTools.CreateParentDirectory(databaseFile);
var csb = new SqlConnectionStringBuilder(connectionString);
var isPostgres = Schema.Current.Settings.IsPostgres;
DatabaseName databaseName = new DatabaseName(null, csb.InitialCatalog, isPostgres);
csb.InitialCatalog = "";
using (SqlServerConnector.Override(new SqlServerConnector(csb.ToString(), null!, SqlServerVersion.SqlServer2012)))
{
DropIfExists(databaseName);
RestoreDatabase(databaseName, backupFile, databaseFile, databaseLogFile);
}
}
protected virtual void DropIfExists(DatabaseName databaseName)
{
DisconnectedTools.DropIfExists(databaseName);
}
protected virtual void RestoreDatabase(DatabaseName databaseName, string backupFile, string databaseFile, string databaseLogFile)
{
DisconnectedTools.RestoreDatabase(databaseName,
Absolutize(backupFile),
Absolutize(databaseFile),
Absolutize(databaseLogFile));
}
public virtual void BackupDatabase(DatabaseName databaseName, string backupFile)
{
DisconnectedTools.BackupDatabase(databaseName, Absolutize(backupFile));
}
protected virtual string Absolutize(string backupFile)
{
if (Path.IsPathRooted(backupFile))
return backupFile;
return Path.Combine(Directory.GetCurrentDirectory(), backupFile);
}
public void DropDatabase(DatabaseName databaseName)
{
DisconnectedTools.DropDatabase(databaseName);
}
}
| 33.105263 | 134 | 0.696343 | [
"MIT"
] | Faridmehr/framework | Signum.Engine.Extensions/Disconnected/LocalBackupManager.cs | 1,887 | C# |
using System;
namespace SIS.HTTP.Exceptions
{
public class BadRequestException : Exception
{
private const string BadRequestExceptionDefaultMessage = "The Request was malformed or contains unsupported elements.";
public BadRequestException() : this(BadRequestExceptionDefaultMessage)
{
}
public BadRequestException(string name) : base(name)
{
}
}
}
| 21.15 | 127 | 0.669031 | [
"MIT"
] | deedeedextor/Software-University | C# Web/Web Basics/Workshop - Bootstrap/04. CSharp-Web-Basics-Workshop-Web-Application-Advanced-CSS-Bootstrap-Skeleton/SIS.HTTP/Exceptions/BadRequestException.cs | 425 | C# |
using System;
using System.Xml.Serialization;
namespace Aop.Api.Domain
{
/// <summary>
/// FaceExtInfo Data Structure.
/// </summary>
[Serializable]
public class FaceExtInfo : AopObject
{
/// <summary>
/// query_type不填, 返回uid query_type=1, 返回手机号 query_type=2, 返回图片
/// </summary>
[XmlElement("query_type")]
public string QueryType { get; set; }
}
}
| 22.105263 | 72 | 0.592857 | [
"Apache-2.0"
] | Varorbc/alipay-sdk-net-all | AlipaySDKNet/Domain/FaceExtInfo.cs | 446 | C# |
using System;
using System.Text;
namespace Discussion.Core.Utilities
{
public static class StringUtility
{
public static string Random(int length = 8)
{
var sb = new StringBuilder();
var random = new Random(Guid.NewGuid().GetHashCode());
do
{
var rand = random.Next(87, 122);
if (rand < 97)
{
rand -= 39;
}
sb.Append((char) rand);
} while (sb.Length < length);
return sb.ToString();
}
public static string RandomNumbers(int length = 6)
{
var sb = new StringBuilder();
var random = new Random();
do
{
var rand = random.Next(0, 9);
sb.Append(rand);
} while (sb.Length < length);
return sb.ToString();
}
public static string MaskPhoneNumber(string phoneNumber)
{
if (phoneNumber == null || phoneNumber.Length < 7)
{
return phoneNumber;
}
return string.Concat(phoneNumber.Substring(0, 3), "****", phoneNumber.Substring(7));
}
public static bool IgnoreCaseEqual(this string one, string theOther)
{
if (one == null && theOther == null)
{
return true;
}
if (one == null || theOther == null)
{
return false;
}
return one.Equals(theOther, StringComparison.CurrentCultureIgnoreCase);
}
public static string SafeSubstring(this string str, int startIndex, int length)
{
if (str == null)
{
return null;
}
startIndex = Math.Max(startIndex, 0);
startIndex = Math.Min(startIndex, str.Length - 1);
length = Math.Max(length, 0);
length = Math.Min(str.Length - startIndex, length);
return str.Substring(startIndex, length);
}
public static string SafeSubstring(this string str, int startIndex)
{
return str?.SafeSubstring(startIndex, str.Length);
}
public static string ToPreferredUserName(this string username)
{
if (string.IsNullOrEmpty(username))
{
return username;
}
var indexOfAt = username.LastIndexOf("@", StringComparison.Ordinal);
return indexOfAt < 0 ? username : username.Substring(0, indexOfAt);
}
}
} | 27.69697 | 96 | 0.477753 | [
"MIT"
] | dotnetclub-net/dotnetclub | src/Discussion.Core/Utilities/StringUtility.cs | 2,742 | C# |
using System;
namespace Testing.TestBCL {
class ClassA: Object {
public void m() {
// * BCL qualified names resolution
Console.WriteLine( base.ToString() );
// * BCL overload
random.Next();
random.Next(10);
random.Next(0,10);
}
// * BCL attribute definition
private Random random = new Random();
public bool theSame(Object parameter) {
// * BCL inheritance of static members
return Equals(this, parameter); // Equals is a static member of System.Object
}
public void properties() {
// * BCL properties
// read
string theASCIInameInstalled = System.Text.ASCIIEncoding.ASCII.BodyName;
// write
Console.Title="title";
}
}
class ClassB: ClassA, ICloneable, Clonable {
// * BCL arguments
public Object cloneAICloneable(ICloneable clonable) {
// * BCL interfaces
return clonable.Clone();
}
public override Object Clone() {
// * BCL inheritance and protected members
return base.MemberwiseClone();
}
}
interface Clonable: ICloneable {}
// * Any class is a subtype of System.Object (except System.Object)
class ClassC {
bool theSame(Object other) {
// * Without implicit object
Equals(other);
// * With the this reserved word
this.Equals(other);
// * With the base reserved word
return this.Equals(other);
}
public static void Main() { }
}
} | 27.190476 | 89 | 0.530064 | [
"MIT"
] | ComputationalReflection/StaDyn | Tests/bin/Debug/tests/semantic/testExplicit.BCL.cs | 1,713 | C# |
using Dependinator.Utils.OsSystem;
using NUnit.Framework;
namespace DependinatorTest.Utils
{
[TestFixture]
[Explicit]
public class ProcessTest
{
[Test]
public void Test()
{
Cmd cmd = new Cmd();
CmdResult result = cmd.Run("git", "version");
Assert.AreEqual(0, result.ExitCode);
Assert.That(result.Output, Does.StartWith("git version 2."));
}
}
}
| 19.565217 | 73 | 0.568889 | [
"MIT"
] | michael-reichenauer/Dependinator | DependinatorTest/Utils/CmdTest.cs | 452 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
internal static partial class Interop
{
internal static partial class Gdi32
{
[LibraryImport(Libraries.Gdi32)]
public static partial BOOL LPtoDP(HDC hdc, ref RECT lppt, int c);
}
}
| 30.2 | 73 | 0.728477 | [
"MIT"
] | Olina-Zhang/winforms | src/System.Windows.Forms.Primitives/src/Interop/Gdi32/Interop.LPtoDP.cs | 455 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IdentityServer4.Models;
using IdentityServer4.Stores;
using Mcrio.IdentityServer.On.RavenDb.Storage.Mappers;
using Mcrio.IdentityServer.On.RavenDb.Storage.RavenDb;
using Microsoft.Extensions.Logging;
using Raven.Client.Documents;
using Raven.Client.Documents.Commands;
using Raven.Client.Documents.Linq;
using Raven.Client.Documents.Session;
namespace Mcrio.IdentityServer.On.RavenDb.Storage.Stores
{
public class ResourceStore : ResourceStore<Entities.IdentityResource, Entities.ApiResource, Entities.ApiScope>
{
public ResourceStore(
IdentityServerDocumentSessionProvider identityServerDocumentSessionProvider,
IIdentityServerStoreMapper mapper,
ILogger<ResourceStore<Entities.IdentityResource, Entities.ApiResource, Entities.ApiScope>> logger)
: base(identityServerDocumentSessionProvider, mapper, logger)
{
}
}
public abstract class ResourceStore<TIdentityResourceEntity, TApiResourceEntity, TApiScopeEntity> : IResourceStore
where TIdentityResourceEntity : Entities.IdentityResource
where TApiResourceEntity : Entities.ApiResource
where TApiScopeEntity : Entities.ApiScope
{
protected ResourceStore(
IdentityServerDocumentSessionProvider identityServerDocumentSessionProvider,
IIdentityServerStoreMapper mapper,
ILogger<ResourceStore<TIdentityResourceEntity, TApiResourceEntity, TApiScopeEntity>> logger)
{
DocumentSession = identityServerDocumentSessionProvider();
Mapper = mapper;
Logger = logger;
}
protected IAsyncDocumentSession DocumentSession { get; }
protected IIdentityServerStoreMapper Mapper { get; }
protected ILogger<ResourceStore<TIdentityResourceEntity, TApiResourceEntity, TApiScopeEntity>> Logger { get; }
public virtual async Task<IEnumerable<IdentityResource>> FindIdentityResourcesByScopeNameAsync(
IEnumerable<string> scopeNames)
{
if (scopeNames == null)
{
throw new ArgumentNullException(nameof(scopeNames));
}
List<string> ids = scopeNames
.Select(scopeName => Mapper.CreateEntityId<TIdentityResourceEntity>(scopeName))
.ToList();
if (ids.Count == 0)
{
return new IdentityResource[0];
}
Dictionary<string, TIdentityResourceEntity> entitiesDict = await DocumentSession
.LoadAsync<TIdentityResourceEntity>(ids)
.ConfigureAwait(false);
return entitiesDict
.Values
.Where(entity => entity != null)
.Select(entity => Mapper.ToModel<TIdentityResourceEntity, IdentityResource>(entity));
}
public virtual async Task<IEnumerable<ApiScope>> FindApiScopesByNameAsync(IEnumerable<string> scopeNames)
{
if (scopeNames == null)
{
throw new ArgumentNullException(nameof(scopeNames));
}
List<string> ids = scopeNames
.Select(scopeName => Mapper.CreateEntityId<TApiScopeEntity>(scopeName))
.ToList();
if (ids.Count == 0)
{
return new ApiScope[0];
}
Dictionary<string, TApiScopeEntity> entitiesDict = await DocumentSession
.LoadAsync<TApiScopeEntity>(ids)
.ConfigureAwait(false);
return entitiesDict
.Values
.Where(entity => entity != null)
.Select(entity => Mapper.ToModel<TApiScopeEntity, ApiScope>(entity));
}
public virtual async Task<IEnumerable<ApiResource>> FindApiResourcesByScopeNameAsync(
IEnumerable<string> scopeNames)
{
if (scopeNames == null)
{
throw new ArgumentNullException(nameof(scopeNames));
}
List<string> names = scopeNames.ToList();
if (names.Count == 0)
{
return new ApiResource[0];
}
List<TApiResourceEntity> entities = await DocumentSession
.Query<TApiResourceEntity>()
.Where(resource => resource.Scopes.In(names))
.ToListAsync()
.ConfigureAwait(false);
return entities.Select(entity => Mapper.ToModel<TApiResourceEntity, ApiResource>(entity));
}
public virtual async Task<IEnumerable<ApiResource>> FindApiResourcesByNameAsync(
IEnumerable<string> apiResourceNames)
{
if (apiResourceNames == null)
{
throw new ArgumentNullException(nameof(apiResourceNames));
}
List<string> ids = apiResourceNames
.Select(apiResourceName => Mapper.CreateEntityId<TApiResourceEntity>(apiResourceName))
.ToList();
if (ids.Count == 0)
{
return new ApiResource[0];
}
Dictionary<string, TApiResourceEntity> entitiesDict = await DocumentSession
.LoadAsync<TApiResourceEntity>(ids)
.ConfigureAwait(false);
IEnumerable<ApiResource> resources = entitiesDict
.Values
.Where(entity => entity != null)
.Select(entity => Mapper.ToModel<TApiResourceEntity, ApiResource>(entity));
return resources;
}
public virtual async Task<Resources> GetAllResourcesAsync()
{
IRavenQueryable<TIdentityResourceEntity> identityResourcesQuery =
DocumentSession.Query<TIdentityResourceEntity>();
IRavenQueryable<TApiResourceEntity> apiResourceQuery = DocumentSession.Query<TApiResourceEntity>();
IRavenQueryable<TApiScopeEntity> apiScopesQuery = DocumentSession.Query<TApiScopeEntity>();
IAsyncEnumerator<StreamResult<TIdentityResourceEntity>>? identityStreamResult =
await DocumentSession
.Advanced
.StreamAsync(identityResourcesQuery)
.ConfigureAwait(false);
var identityResources = new List<IdentityResource>();
while (await identityStreamResult.MoveNextAsync().ConfigureAwait(false))
{
identityResources.Add(
Mapper.ToModel<TIdentityResourceEntity, IdentityResource>(identityStreamResult.Current.Document)
);
}
IAsyncEnumerator<StreamResult<TApiResourceEntity>> apiResourceStreamResult =
await DocumentSession
.Advanced
.StreamAsync(apiResourceQuery)
.ConfigureAwait(false);
var apiResources = new List<ApiResource>();
while (await apiResourceStreamResult.MoveNextAsync().ConfigureAwait(false))
{
apiResources.Add(
Mapper.ToModel<TApiResourceEntity, ApiResource>(apiResourceStreamResult.Current.Document)
);
}
IAsyncEnumerator<StreamResult<TApiScopeEntity>> apiScopeStreamResult =
await DocumentSession
.Advanced
.StreamAsync(apiScopesQuery)
.ConfigureAwait(false);
var apiScopes = new List<ApiScope>();
while (await apiScopeStreamResult.MoveNextAsync().ConfigureAwait(false))
{
apiScopes.Add(Mapper.ToModel<TApiScopeEntity, ApiScope>(apiScopeStreamResult.Current.Document));
}
return new Resources(identityResources, apiResources, apiScopes);
}
}
} | 39.287129 | 118 | 0.619204 | [
"MIT"
] | mcrio/Mcrio.IdentityServer.On.RavenDb | src/Mcrio.IdentityServer.On.RavenDb.Storage/Stores/ResourceStore.cs | 7,936 | C# |
namespace PlayTennis.Data.Seeding
{
using System;
using System.Threading.Tasks;
public interface ISeeder
{
Task SeedAsync(ApplicationDbContext dbContext, IServiceProvider serviceProvider);
}
}
| 20.272727 | 89 | 0.721973 | [
"MIT"
] | plambet0/PlayTennis | Data/PlayTennis.Data/Seeding/ISeeder.cs | 225 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace Titalyver2.Settings
{
/// <summary>
/// TimeoutReport.xaml の相互作用ロジック
/// </summary>
public partial class TimeoutReport : Window
{
public TimeoutReport(LyricsSearcherPlugins.TimeoutReport[] timeout_list)
{
InitializeComponent();
List.ItemsSource = timeout_list;
}
}
}
| 23.366667 | 80 | 0.717546 | [
"MIT"
] | Juna-Idler/Titalyver2 | Titalyver2/Settings/TimeoutReport.xaml.cs | 721 | C# |
using System.ComponentModel;
using System.IO;
using Lunt;
using Lunt.IO;
namespace Lake.Tests.Integration.Pipeline
{
[DisplayName("Text Importer")]
[Importer(".txt")]
public class TextImporter : Importer<string>
{
public override string Import(Context context, IFile source)
{
using (var stream = source.Open(FileMode.Open, FileAccess.Read, FileShare.Read))
using (var reader = new StreamReader(stream))
{
// Add a dependency to metadata.
var metadataFile = context.FileSystem.GetFile(source.Path.FullPath + ".metadata");
if (metadataFile.Exists)
{
context.AddDependency(metadataFile);
}
return reader.ReadToEnd();
}
}
}
}
| 28.758621 | 98 | 0.571942 | [
"MIT"
] | lunt/lunt | src/Lake.Tests.Integration/Pipeline/Importers/TextImporter.cs | 836 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace EuroWebApi.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult About()
{
ViewBag.Message = "Your application description page.";
return View();
}
public ActionResult Contact()
{
ViewBag.Message = "Your contact page.";
return View();
}
}
} | 19.233333 | 67 | 0.563258 | [
"Apache-2.0"
] | HkInfotech/Euroapplianceservices | EuroWebApi/Controllers/HomeController.cs | 579 | C# |
// Instance generated by TankLibHelper.InstanceBuilder
// ReSharper disable All
namespace TankLib.STU.Types {
[STUAttribute(0x78BF9026)]
public class STU_78BF9026 : STUInstance {
[STUFieldAttribute(0xE2990E7C, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_E2990E7C;
[STUFieldAttribute(0x40CD1657, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_40CD1657;
[STUFieldAttribute(0x6E3B6397, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_6E3B6397;
[STUFieldAttribute(0xF73F9D67, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_F73F9D67;
[STUFieldAttribute(0x698A7B7F, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_698A7B7F;
[STUFieldAttribute(0x953FF192, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_953FF192;
[STUFieldAttribute(0x9EA71DCC, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_9EA71DCC;
[STUFieldAttribute(0x4FE11EE9, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_4FE11EE9;
[STUFieldAttribute(0xC176AA10, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_C176AA10;
[STUFieldAttribute(0xEB03E1C2, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_EB03E1C2;
[STUFieldAttribute(0x52FE7B8E, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_52FE7B8E;
[STUFieldAttribute(0x4DCFFC1A, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_4DCFFC1A;
[STUFieldAttribute(0x262DEE2F, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_262DEE2F;
[STUFieldAttribute(0x62D80E40, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_62D80E40;
[STUFieldAttribute(0x21B09BFC, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_21B09BFC;
[STUFieldAttribute(0xC298D18C, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_C298D18C;
[STUFieldAttribute(0x3F8788F4, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_3F8788F4;
[STUFieldAttribute(0x38F997AB, "m_entityDefinition", ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_entityDefinition;
[STUFieldAttribute(0x5AAFF322, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_5AAFF322;
[STUFieldAttribute(0x8A076920, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_8A076920;
[STUFieldAttribute(0x410BF8BD, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_410BF8BD;
[STUFieldAttribute(0x9A5202CB, ReaderType = typeof(EmbeddedInstanceFieldReader))]
public STUConfigVar m_9A5202CB;
}
}
| 41.986486 | 111 | 0.749276 | [
"MIT"
] | Mike111177/OWLib | TankLib/STU/Types/STU_78BF9026.cs | 3,107 | C# |
//-----------------------------------------------------------------------
// <copyright file= "EntityConfigurationExtensions.cs">
// Copyright (c) Danvic.Wang All rights reserved.
// </copyright>
// Author: Danvic.Wang
// Created DateTime: 2021/3/7 14:44:35
// Modified by:
// Description: Entity to table configuration
//-----------------------------------------------------------------------
using IngosAbpTemplate.Infrastructure.EntityConfigurations.Volo;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
namespace IngosAbpTemplate.Infrastructure.EntityConfigurations
{
public static class EntityConfigurationExtensions
{
/// <summary>
/// Configure Abp framework own tables/entities
/// </summary>
public static void ConfigureAbpEntities(this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
builder.ConfigureAuditLogging();
builder.ConfigureBackgroundJobs();
builder.ConfigurePermissionManagement();
// #if MsSQL
// builder.ConfigureAuditLogging();
// builder.ConfigureBackgroundJobs();
// builder.ConfigurePermissionManagement();
// #elif PgSQL
// // Due to https://github.com/abpframework/abp/pull/7849 has not release, adopt the temporary method
// //
// builder.ConfigureIngosAuditLogging();
// builder.ConfigureIngosBackgroundJobs();
// builder.ConfigureIngosPermissionManagement();
// #else
// // Due to https://github.com/abpframework/abp/pull/7849 has not release, adopt the temporary method
// //
// builder.ConfigureIngosAuditLogging();
// builder.ConfigureIngosBackgroundJobs();
// builder.ConfigureIngosPermissionManagement();
// #endif
}
/// <summary>
/// Configure project own tables/entities
/// </summary>
public static void ConfigureIngosAbpTemplate(this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
//{
// b.ToTable(Consts.DbTablePrefix + "YourEntities", Consts.DbSchema);
// b.ConfigureByConvention(); //auto configure for the base class props
// //...
//});
}
}
} | 37.695652 | 114 | 0.604767 | [
"MIT"
] | Twtcer/ingos-abp-api-template | templates/src/IngosAbpTemplate.Infrastructure/EntityConfigurations/EntityConfigurationExtensions.cs | 2,603 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.