本文整理汇总了C#中nsIRequest类的典型用法代码示例。如果您正苦于以下问题:C# nsIRequest类的具体用法?C# nsIRequest怎么用?C# nsIRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
nsIRequest类属于命名空间,在下文中一共展示了nsIRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: WrapRequest
/// <summary>
/// Creates nsIRequest wrapper
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public static Request WrapRequest(nsIRequest request)
{
if (request is nsIChannel)
{
return Channel.WrapChannel((nsIChannel)request);
}
if (request is nsIAsyncStreamCopier)
{
return new AsyncStreamCopier((nsIAsyncStreamCopier)request);
}
if (request is nsILoadGroup)
{
return new LoadGroup((nsILoadGroup)request);
}
if (request is nsIIncrementalDownload)
{
return new IncrementalDownload((nsIIncrementalDownload)request);
}
if (request is imgIRequest)
{
return new ImgRequest((imgIRequest)request);
}
if (request is nsIInputStreamPump)
{
}
if (request is nsIURIChecker)
{
return new UriChecker((nsIURIChecker)request);
}
return new Request(request);
}
开发者ID:hacky2000,项目名称:PopcornStudios,代码行数:37,代码来源:Request.cs
示例2:
Boolean nsIURIContentListener.DoContent(String aContentType, Boolean aIsContentPreferred, nsIRequest aRequest, out nsIStreamListener aContentHandler)
{
Trace.TraceInformation("nsIURIContentListener.DoContent: \"{0}\"", aContentType);
aContentHandler = null;
return false;
}
开发者ID:Happy-Ferret,项目名称:dotgecko,代码行数:7,代码来源:WebBrowser.URIContentListener.cs
示例3:
bool nsIURIContentListener.doContent (string aContentType,
bool aIsContentPreferred,
nsIRequest aRequest,
out nsIStreamListener aContentHandler)
{
aContentHandler = null;
return true;
}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:8,代码来源:ContentListener.cs
示例4:
void nsIRequestObserver.OnStopRequest( nsIRequest aRequest, nsISupports aContext, int aStatusCode )
{
var stopped = Stopped;
if (stopped != null)
{
stopped( this, EventArgs.Empty );
}
}
开发者ID:RSchwoerer,项目名称:Terminals,代码行数:8,代码来源:RequestObserver.cs
示例5: LocationChangeEventArgs
void nsIWebProgressListener.OnLocationChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsIURI aLocation)
{
Trace.TraceInformation("nsIWebProgressListener.OnLocationChange");
var e = new LocationChangeEventArgs(aLocation.ToUri());
Events.Raise(EventKey.LocationChange, e);
if (e.Cancel && (aRequest != null))
{
aRequest.Cancel(nsResult.NS_BINDING_ABORTED);
}
}
开发者ID:Happy-Ferret,项目名称:dotgecko,代码行数:11,代码来源:WebBrowser.WebProgressListener.cs
示例6: RequestProgressChangeEventArgs
void nsIWebProgressListener.OnProgressChange(nsIWebProgress aWebProgress, nsIRequest aRequest, Int32 aCurSelfProgress, Int32 aMaxSelfProgress, Int32 aCurTotalProgress, Int32 aMaxTotalProgress)
{
Trace.TraceInformation("nsIWebProgressListener.OnProgressChange");
var e = new RequestProgressChangeEventArgs(aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
Events.Raise(EventKey.RequestProgressChange, e);
if (e.Cancel && (aRequest != null))
{
aRequest.Cancel(nsResult.NS_BINDING_ABORTED);
}
}
开发者ID:Happy-Ferret,项目名称:dotgecko,代码行数:11,代码来源:WebBrowser.WebProgressListener.cs
示例7: RequestStatusChangeEventArgs
void nsIWebProgressListener.OnStatusChange(nsIWebProgress aWebProgress, nsIRequest aRequest, UInt32 aStatus, String aMessage)
{
Trace.TraceInformation("nsIWebProgressListener.OnStatusChange");
var e = new RequestStatusChangeEventArgs(aStatus, aMessage);
Events.Raise(EventKey.RequestStatusChange, e);
if (e.Cancel && (aRequest != null))
{
aRequest.Cancel(nsResult.NS_BINDING_ABORTED);
}
}
开发者ID:Happy-Ferret,项目名称:dotgecko,代码行数:11,代码来源:WebBrowser.WebProgressListener.cs
示例8: GeckoResponse
internal GeckoResponse(nsIRequest request)
{
// we use only one wrapper
_request = Request.WrapRequest( request );
if ( _request is Channel )
{
_channel = ( Channel ) _request;
if ( _channel is HttpChannel )
{
_httpChannel = ( HttpChannel ) _channel;
}
}
}
开发者ID:K-Library-NET,项目名称:PopcornStudios,代码行数:13,代码来源:GeckoResponse.cs
示例9: OnProgressChange
public void OnProgressChange(nsIWebProgress webProgress, nsIRequest request, int currentSelfProgress,
int maxSelfProgress,
int currentTotalProgress, int maxTotalProgress)
{
if (maxTotalProgress == 0)
return;
// if we use the maxTotalProgress, the problem is that it starts off below 100, the jumps to 100 at the end
// so it looks a lot better to just always scale, to 100, the current progress by the max at that point
RaiseStatusChanged(new PdfMakingStatus()
{
percentage = (int) (100.0*(currentTotalProgress)/maxTotalProgress),
statusLabel = Status
});
}
开发者ID:hatton,项目名称:geckofxHtmlToPdf,代码行数:15,代码来源:GeckofxHtmlToPDFComponent.cs
示例10: OnStateChange
public void OnStateChange(nsIWebProgress aWebProgress, nsIRequest aRequest, uint aStateFlags, int aStatus)
{
_finished = (aStateFlags & nsIWebProgressListenerConstants.STATE_STOP) != 0;
}
开发者ID:hatton,项目名称:geckofxHtmlToPdf,代码行数:4,代码来源:GeckofxHtmlToPDFComponent.cs
示例11: OnSecurityChange
public void OnSecurityChange(nsIWebProgress aWebProgress, nsIRequest aRequest, uint aState)
{
}
开发者ID:hatton,项目名称:geckofxHtmlToPdf,代码行数:3,代码来源:GeckofxHtmlToPDFComponent.cs
示例12: OnLocationChange
public void OnLocationChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsIURI aLocation, uint aFlags)
{
}
开发者ID:hatton,项目名称:geckofxHtmlToPdf,代码行数:3,代码来源:GeckofxHtmlToPDFComponent.cs
示例13: OnStatusChange
public void OnStatusChange(nsIWebProgress aWebProgress, nsIRequest aRequest, int aStatus, string aMessage)
{
}
开发者ID:hatton,项目名称:geckofxHtmlToPdf,代码行数:3,代码来源:GeckofxHtmlToPDFComponent.cs
示例14: OnProgressChange
public void OnProgressChange(nsIWebProgress aWebProgress, nsIRequest aRequest, int aCurSelfProgress, int aMaxSelfProgress, int aCurTotalProgress, int aMaxTotalProgress)
{
}
开发者ID:BloomBooks,项目名称:BloomDesktop,代码行数:3,代码来源:PdfViewer.cs
示例15: OnStatusChange
private void OnStatusChange( nsIWebProgress aWebProgress, nsIRequest aRequest, int aStatus, string aMessage )
{
if (!_isListening) return;
var evnt = _onStatusChangeCallback;
if ( evnt != null ) evnt( aMessage );
}
开发者ID:hacky2000,项目名称:PopcornStudios,代码行数:6,代码来源:WebProgressListener.cs
示例16: UpdateCommandStatus
void nsIWebProgressListener.OnStatusChange(nsIWebProgress aWebProgress, nsIRequest aRequest, int aStatus, string aMessage)
{
if (aWebProgress.GetIsLoadingDocument())
{
StatusText = aMessage;
UpdateCommandStatus();
}
}
开发者ID:quantum1423-dustbin,项目名称:OpenGeckoSharp,代码行数:8,代码来源:GeckoWebBrowser.cs
示例17: SetSecurityState
void nsIWebProgressListener.OnSecurityChange(nsIWebProgress aWebProgress, nsIRequest aRequest, int aState)
{
SetSecurityState((GeckoSecurityState) aState);
}
开发者ID:quantum1423-dustbin,项目名称:OpenGeckoSharp,代码行数:4,代码来源:GeckoWebBrowser.cs
示例18: OnLocationChange
void nsIWebProgressListener2.OnLocationChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsIURI aLocation, uint aFlags)
{
OnLocationChange(aWebProgress, aRequest, aLocation, aFlags);
}
开发者ID:hacky2000,项目名称:PopcornStudios,代码行数:4,代码来源:WebProgressListener.cs
示例19: OnStateChange
void nsIWebProgressListener.OnStateChange( nsIWebProgress aWebProgress, nsIRequest aRequest, uint aStateFlags, int aStatus )
{
OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus);
}
开发者ID:hacky2000,项目名称:PopcornStudios,代码行数:4,代码来源:WebProgressListener.cs
示例20: OnSecurityChange
void nsIWebProgressListener.OnSecurityChange( nsIWebProgress aWebProgress, nsIRequest aRequest, uint aState )
{
OnSecurityChange( aWebProgress, aRequest, aState );
}
开发者ID:hacky2000,项目名称:PopcornStudios,代码行数:4,代码来源:WebProgressListener.cs
注:本文中的nsIRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论