本文整理汇总了C#中IReport类的典型用法代码示例。如果您正苦于以下问题:C# IReport类的具体用法?C# IReport怎么用?C# IReport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IReport类属于命名空间,在下文中一共展示了IReport类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Process
private static void Process(IReport report)
{
string requesterName = report.UserName;
string requesterEmail = report.Email ?? "[email protected]";
string uploadToken = UploadFile(report.Attachment);
string body = "{\"ticket\":{";
body += string.Format("\"subject\": \"{0}\",", Correct(report.Title));
body += Comment(report.Body, uploadToken);
body += string.Format("\"requester\": {{\"name\": \"{0}\", \"email\": \"{1}\"}},"
, Correct(requesterName), Correct(requesterEmail));
body += string.Format("\"type\": \"{0}\",", report.Type == ReportType.Feedback ? "question" : "incident");
body += string.Format("\"priority\": \"{0}\",", report.Type == ReportType.Crash ? "urgent" : "high");
string tags = "\"tags\": [";
for (int i = 0; i < report.Tags.Length; i++)
tags += string.Format("{0}\"{1}\"", i == 0 ? "" : ", ", Correct(report.Tags[i]));
tags += "]";
body += tags;
body += "}}";
PostRequest(Url + "/api/v2/tickets.json", "application/json", body);
}
开发者ID:Fedorm,项目名称:core-master,代码行数:30,代码来源:ZendeskReportSender.cs
示例2: Grab
public IEnumerable<DataCollection> Grab(IReport report)
{
// define appropriate Cursor for current Report
var cursor = _cursorSelector.DefineCursor(report);
if (cursor == null)
throw new ReportFormatException();
// define appropriate Mapping for current Report from _mappings list
var mapping = _mappings.FirstOrDefault(m =>
{
try { return cursor.CheckCondition(m.Match); }
catch { return false; }
});
if (mapping == null)
throw new MappingNotFoundException();
var result = new List<DataCollection>();
while (cursor.MoveNext(mapping.Range))
{
// define if current position should be skipped
if (mapping.Rules != null)
if (mapping.Rules.Any(r => r.Name.ToLower() == "skip" && cursor.CheckCondition(r.Condition)))
continue;
// get the DataCollection for all the Fields in the Mapping
var collection = new DataCollection(mapping.Fields.Select(f => this.GetDataFromField(cursor, f)));
if (collection.Values != null && collection.Values.Count > 0)
result.Add(collection);
}
return result;
}
开发者ID:sxkote,项目名称:ReportGrabber,代码行数:33,代码来源:Grabber.cs
示例3: display
public void display(IReport report)
{
var the_active_report = report.downcast_to<ActiveReport>();
the_active_report.Run();
ux_report_viewer.Document = the_active_report.Document;
titled(report.name);
}
开发者ID:mokhan,项目名称:mo.money,代码行数:7,代码来源:ReportViewer.cs
示例4: SendReport
public Task<bool> SendReport(IReport report)
{
var tcs = new TaskCompletionSource<bool>();
if (MFMailComposeViewController.CanSendMail)
{
var c = new MFMailComposeViewController();
c.SetSubject(report.Title);
c.SetToRecipients(new[] {_settings.DevelopersEmail});
c.SetMessageBody(report.Body, false);
NSData data = new NSString(report.Attachment).DataUsingEncoding(NSStringEncoding.UTF8);
c.AddAttachmentData(data, "text/xml", "info.xml");
_application.RootController.PresentViewController(c, true, null);
c.Finished += (sender, e) =>
{
tcs.SetResult(e.Result == MFMailComposeResult.Sent);
e.Controller.DismissViewController(true, null);
};
}
else
{
var alert = new UIAlertView("Cannot send report", "E-mail messages not allowed", null, "OK");
alert.Clicked += (sender, args) => tcs.SetResult(false);
alert.Show();
}
return tcs.Task;
}
开发者ID:Fedorm,项目名称:core-master,代码行数:26,代码来源:EmailProvider.cs
示例5: DefineCursor
public ICursor DefineCursor(IReport report)
{
ICursor result = null;
if (!String.IsNullOrEmpty(report.Filename))
{
// first, try to define the Cursor by file extension
if (report.Filename.EndsWith(".xlsx", StringComparison.InvariantCultureIgnoreCase))
{
// try to define Cursor by file extension (.xlsx => Excel 2007)
if ((result = this.TryExcel2007(report.Data)) != null)
return result;
}
else if (report.Filename.EndsWith(".xls", StringComparison.InvariantCultureIgnoreCase))
{
// try to define Cursor by file extension (.xls => Excel 2003)
if ((result = this.TryExcel2003(report.Data)) != null)
return result;
}
}
// if the Cursor is not defined yet than we should loop for all available Cursors
if ((result = this.TryExcel2003(report.Data)) != null)
return result;
if ((result = this.TryExcel2007(report.Data)) != null)
return result;
return null;
}
开发者ID:sxkote,项目名称:ReportGrabber,代码行数:32,代码来源:CursorSelector.cs
示例6: EasilyReportLog
public EasilyReportLog(string reportExportMode, string objType, string logFileName, IReport rpt)
{
mReportExportMode = reportExportMode;
mObjType = objType;
mLogFileName = logFileName;
report = rpt;
}
开发者ID:san90279,项目名称:UK_OAS,代码行数:7,代码来源:EasilyReportLog.cs
示例7: LocalPackageRepository
public LocalPackageRepository(string physicalPath, IReport report, bool enableCaching)
: this(new DefaultPackagePathResolver(physicalPath),
new PhysicalFileSystem(physicalPath),
report,
enableCaching)
{
}
开发者ID:elanwu123,项目名称:dnx,代码行数:7,代码来源:LocalPackageRepository.cs
示例8: PrepareFileResult
private ActionResult PrepareFileResult(IReport report, string ext, bool download,
byte[] renderedBytes, ReportRegistry.Report reportInfo)
{
string fileDownloadName;
var customFileName = report as ICustomFileName;
if (customFileName != null)
fileDownloadName = customFileName.GetFileName();
else
fileDownloadName = (reportInfo.Title ?? reportInfo.Key) + "_" +
DateTime.Now.ToString("yyyyMMdd_HHss");
fileDownloadName += "." + ext;
if (download)
{
return new FileContentResult(renderedBytes, "application/octet-stream")
{
FileDownloadName = fileDownloadName
};
}
var cd = new ContentDisposition
{
Inline = true,
FileName = fileDownloadName
};
Response.AddHeader("Content-Disposition", cd.ToString());
return File(renderedBytes, UploadHelper.GetMimeType(fileDownloadName));
}
开发者ID:C-DUCK,项目名称:Sningle,代码行数:30,代码来源:ReportController.cs
示例9: HttpSource
public HttpSource(
string baseUri,
string userName,
string password,
IReport report)
{
_baseUri = baseUri + (baseUri.EndsWith("/") ? "" : "/");
_userName = userName;
_password = password;
_report = report;
var proxy = Environment.GetEnvironmentVariable("http_proxy");
if (string.IsNullOrEmpty(proxy))
{
#if NET45
_client = new HttpClient();
#else
_client = new HttpClient(new Microsoft.Net.Http.Client.ManagedHandler());
#endif
}
else
{
// To use an authenticated proxy, the proxy address should be in the form of
// "http://user:[email protected]:8888"
var proxyUriBuilder = new UriBuilder(proxy);
#if NET45
var webProxy = new WebProxy(proxy);
if (string.IsNullOrEmpty(proxyUriBuilder.UserName))
{
// If no credentials were specified we use default credentials
webProxy.Credentials = CredentialCache.DefaultCredentials;
}
else
{
ICredentials credentials = new NetworkCredential(proxyUriBuilder.UserName,
proxyUriBuilder.Password);
webProxy.Credentials = credentials;
}
var handler = new HttpClientHandler
{
Proxy = webProxy,
UseProxy = true
};
_client = new HttpClient(handler);
#else
if (!string.IsNullOrEmpty(proxyUriBuilder.UserName))
{
_proxyUserName = proxyUriBuilder.UserName;
_proxyPassword = proxyUriBuilder.Password;
}
_client = new HttpClient(new Microsoft.Net.Http.Client.ManagedHandler()
{
ProxyAddress = new Uri(proxy)
});
#endif
}
}
开发者ID:jack4it,项目名称:KRuntime,代码行数:59,代码来源:HttpSource.cs
示例10: Robot
public Robot(CommandSet commandSet, IReport reporter, Location bottomLeftBound, Location topRightBound)
{
_commandSet = commandSet;
_reporter = reporter;
_bottomLeftBound = bottomLeftBound;
_topRightBound = topRightBound;
Position = _commandSet.StartPosition;
}
开发者ID:shaneinsweden,项目名称:RobotCleaner,代码行数:8,代码来源:Robot.cs
示例11: PrintReport
public string PrintReport(IReport report)
{
var output = string.Format("##teamcity[buildStatus text='{{build.status.text}}, Build warnings: {0} ({1} unique)']\r\n", report.TotalEntriesCount, report.UniqueEntriesCount);
output += string.Format("##teamcity[buildStatisticValue key='BuildWarnings' value='{0}']\r\n", report.TotalEntriesCount);
output += string.Format("##teamcity[buildStatisticValue key='BuildWarningsUnique' value='{0}']\r\n", report.UniqueEntriesCount);
return output;
}
开发者ID:nvsnkv,项目名称:logutils,代码行数:8,代码来源:TeamCityReporter.cs
示例12: fmPictureView
public fmPictureView(IReport rpt, int index)
{
InitializeComponent();
this.report = rpt;
this.Text = ERptMultiLanguage.GetLanValue("fmPictureView");
this.pictureBox.Image = this.report.Images[index].Image;
}
开发者ID:san90279,项目名称:UK_OAS,代码行数:8,代码来源:fmPictureView.cs
示例13: Generate
/// <summary>
/// Generates a report filled with the content supplied by <paramref name="report"/>.
/// </summary>
/// <param name="report">Specifies the report model.</param>
public void Generate(IReport report)
{
var contentBuilder = CreateContent(report);
_fileWriter.Write(
string.Concat(report.ReflectedAssembly, ".txt"),
writer => writer.Write(contentBuilder.ToString()));
}
开发者ID:BjRo,项目名称:xunitbddextensions,代码行数:12,代码来源:TextReportGenerator.cs
示例14: fmEasilyReportDesigner
public fmEasilyReportDesigner(IReport rpt, IDesignerHost designerHost)
{
InitializeComponent();
designReport = rpt;
tempReport = rpt.Copy();
componentChangeService = designerHost.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
}
开发者ID:san90279,项目名称:UK_OAS,代码行数:8,代码来源:fmEasilyReportDesigner.cs
示例15: AddReport
public void AddReport(IReport report)
{
if (GetReport(report.Manufacturer, report.Model) != null)
{
throw new DuplicateEntryException(Constants.DUPLICATE);
}
Reports.Add(report);
}
开发者ID:krisitown,项目名称:HQC_AirConditionerTesting,代码行数:8,代码来源:ConditionerData.cs
示例16: fmProgress
/// <summary>
/// The contructor function of frmProgress
/// </summary>
/// <param name="title">The title of the form</param>
/// <param name="reportExport">The reportExport component to use</param>
public fmProgress(string title, IReportExport reportExport, IReport rpt)
{
InitializeComponent();
iReportExport = reportExport;
td = new Thread(new ThreadStart(Begin));
execSuccess = false;
this.report = rpt;
}
开发者ID:san90279,项目名称:UK_OAS,代码行数:14,代码来源:fmProgress.cs
示例17: Notify
public void Notify(IReport report)
{
IReportObserver observer;
foreach (Object obj in _observers)
{
observer = (IReportObserver)obj;
observer.Update(report);
}
}
开发者ID:malweth,项目名称:Modular-Network-Simulator,代码行数:9,代码来源:SearchAggregator.cs
示例18: AddReport
public void AddReport(IReport report)
{
if (this.Reports.Contains(report))
{
throw new DuplicateEntryException(Constants.DuplicateEntry);
}
this.Reports.Add(report);
}
开发者ID:simooo93,项目名称:Exams,代码行数:9,代码来源:Database.cs
示例19: PackageFolder
public PackageFolder(
string physicalPath,
IReport report)
{
_repository = new LocalPackageRepository(physicalPath)
{
Report = report
};
_report = report;
}
开发者ID:jack4it,项目名称:KRuntime,代码行数:10,代码来源:PackageFolder.cs
示例20: fmReportExport
public fmReportExport(IReport rpt)
{
InitializeComponent();
designReport = rpt;
tempReport = rpt.Copy();
//ERptMultiLanguage.clientLanguageNum = 0;
InitLanguage();
InitComponentValue();
}
开发者ID:san90279,项目名称:UK_OAS,代码行数:11,代码来源:fmReportExport.cs
注:本文中的IReport类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论