├── samples ├── ClientServerApp │ ├── .gitignore │ ├── ClientServerApp.Client │ │ ├── Index.cshtml │ │ ├── wwwroot │ │ │ ├── css │ │ │ │ └── fonts │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── index.html │ │ ├── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Shared │ │ │ └── _Layout.cshtml │ │ ├── ClientServerApp.Client.csproj │ │ ├── Counter.cshtml │ │ └── CounterDisplay.cshtml │ ├── ClientServerApp.Shared │ │ ├── ClientServerApp.Shared.csproj │ │ └── WeatherForecast.cs │ └── ClientServerApp.Server │ │ ├── Program.cs │ │ └── ClientServerApp.Server.csproj └── JSLibs │ ├── JSLibs.csproj │ └── Bootstrap │ └── Modal.cs ├── src ├── DNA │ ├── .gitignore │ ├── corlib │ │ ├── System │ │ │ ├── IDisposable.cs │ │ │ ├── ConsoleModifiers.cs │ │ │ ├── DayOfWeek.cs │ │ │ ├── OperationCanceledException.cs │ │ │ ├── DateTimeOffset.cs │ │ │ ├── IComparable.cs │ │ │ ├── IFormatProvider.cs │ │ │ ├── FormatException.cs │ │ │ ├── IAsyncResult.cs │ │ │ ├── AggregateException.cs │ │ │ ├── InvalidOperationException.cs │ │ │ ├── IndexOutOfRangeException.cs │ │ │ ├── BitConverter.cs │ │ │ └── Func.cs │ │ ├── System.ComponentModel.DataAnnotations │ │ │ ├── ValidationAttribute.cs │ │ │ ├── RequiredAttribute.cs │ │ │ ├── StringLengthAttribute.cs │ │ │ └── DisplayNameAttribute.cs │ │ ├── System.IO │ │ │ ├── SeekOrigin.cs │ │ │ ├── FileAccess.cs │ │ │ ├── FileNotFoundException.cs │ │ │ ├── FileShare.cs │ │ │ ├── FileMode.cs │ │ │ ├── IOException.cs │ │ │ ├── DirectoryNotFoundException.cs │ │ │ ├── SearchPattern.cs │ │ │ ├── FileAttributes.cs │ │ │ ├── File.cs │ │ │ └── FileInfo.cs │ │ ├── System.Globalization │ │ │ ├── DigitShapes.cs │ │ │ ├── CalendarWeekRule.cs │ │ │ ├── CultureTypes.cs │ │ │ └── GregorianCalendarTypes.cs │ │ ├── System.Runtime.CompilerServices │ │ │ ├── VoidTaskResult.cs │ │ │ ├── IAsyncMethodBuilder.cs │ │ │ ├── AsyncServices.cs │ │ │ ├── IAsyncStateMachine.cs │ │ │ └── INotifyCompletion.cs │ │ ├── System.Reflection │ │ │ ├── TypeInfo.cs │ │ │ ├── AssemblyName.cs │ │ │ ├── IntrospectionExtensions.cs │ │ │ ├── RuntimeReflectionExtensions.cs │ │ │ ├── MethodInfo.cs │ │ │ └── PropertyInfo.cs │ │ ├── System.Runtime.Versioning │ │ │ └── TargetFrameworkAttribute.cs │ │ ├── corlib.csproj │ │ └── System.Net.Http │ │ │ ├── HttpContent.cs │ │ │ └── StringContent.cs │ └── native │ │ ├── System.Attribute.h │ │ └── src │ │ ├── Reflection.h │ │ ├── System.Reflection.MethodInfo.h │ │ ├── System.Reflection.MemberInfo.h │ │ ├── System.Reflection.MethodBase.h │ │ ├── System.Reflection.PropertyInfo.h │ │ ├── JSInterop.h │ │ └── System.Attribute.h ├── AngleSharp │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Css │ │ ├── Values │ │ │ ├── ITimingFunction.cs │ │ │ ├── IImageSource.cs │ │ │ ├── ITransform.cs │ │ │ └── IGradient.cs │ │ ├── IPropertyValue.cs │ │ ├── IValueConverter.cs │ │ └── ValueConverters │ │ │ └── RequiredValueConverter.cs │ ├── Services │ │ ├── IMediaFeatureFactory.cs │ │ ├── Media │ │ │ ├── IAudioInfo.cs │ │ │ ├── IResourceInfo.cs │ │ │ ├── IMediaInfo.cs │ │ │ ├── IImageInfo.cs │ │ │ ├── IVideoInfo.cs │ │ │ └── IObjectInfo.cs │ │ ├── IInputTypeFactory.cs │ │ ├── ILinkRelationFactory.cs │ │ ├── IElementFactory.cs │ │ ├── IEntityProvider.cs │ │ ├── ICommandProvider.cs │ │ ├── IEventFactory.cs │ │ ├── IPseudoClassSelectorFactory.cs │ │ ├── IStylingProvider.cs │ │ ├── IPseudoElementSelectorFactory.cs │ │ ├── IScriptingProvider.cs │ │ ├── IEncodingProvider.cs │ │ ├── IServiceFactory.cs │ │ ├── IIntegrityProvider.cs │ │ └── ICssPropertyFactory.cs │ ├── Network │ │ ├── RequestProcessors │ │ │ └── IRequestProcessor.cs │ │ ├── OriginBehavior.cs │ │ ├── ILoader.cs │ │ ├── IDownload.cs │ │ ├── IDocumentLoader.cs │ │ ├── HttpMethod.cs │ │ ├── CorsSetting.cs │ │ └── IResourceLoader.cs │ ├── Interfaces │ │ ├── Html │ │ │ ├── IHtmlHrElement.cs │ │ │ ├── IHtmlDivElement.cs │ │ │ ├── IHtmlPreElement.cs │ │ │ ├── IHtmlHeadElement.cs │ │ │ ├── IHtmlSpanElement.cs │ │ │ ├── IHtmlBreakRowElement.cs │ │ │ ├── IHtmlAudioElement.cs │ │ │ ├── IHtmlParagraphElement.cs │ │ │ ├── IHtmlUnknownElement.cs │ │ │ ├── IHtmlDocument.cs │ │ │ ├── IHtmlHeadingElement.cs │ │ │ ├── IHtmlUnorderedListElement.cs │ │ │ ├── IHtmlTableCaptionElement.cs │ │ │ ├── IHtmlTableDataCellElement.cs │ │ │ ├── IHtmlBodyElement.cs │ │ │ ├── IHtmlFormControlsCollection.cs │ │ │ ├── IHtmlLegendElement.cs │ │ │ ├── IHtmlTimeElement.cs │ │ │ ├── ILabelabelElement.cs │ │ │ ├── IHtmlTitleElement.cs │ │ │ ├── IHtmlDataElement.cs │ │ │ ├── IHtmlQuoteElement.cs │ │ │ ├── IHtmlTemplateElement.cs │ │ │ ├── IHtmlDataListElement.cs │ │ │ ├── IHtmlListItemElement.cs │ │ │ ├── IHtmlDetailsElement.cs │ │ │ ├── IHtmlHtmlElement.cs │ │ │ ├── IHtmlTableHeaderCellElement.cs │ │ │ ├── IHtmlTableColumnElement.cs │ │ │ ├── IHtmlBaseElement.cs │ │ │ ├── IHtmlParamElement.cs │ │ │ ├── IHtmlMenuElement.cs │ │ │ └── IHtmlOptionsGroupElement.cs │ │ ├── Svg │ │ │ ├── ISvgSvgElement.cs │ │ │ ├── ISvgTitleElement.cs │ │ │ ├── ISvgCircleElement.cs │ │ │ ├── ISvgDescriptionElement.cs │ │ │ ├── ISvgForeignObjectElement.cs │ │ │ ├── ISvgElement.cs │ │ │ └── ISvgDocument.cs │ │ ├── Xml │ │ │ └── IXmlDocument.cs │ │ ├── Css │ │ │ ├── ICssComment.cs │ │ │ ├── ICssSupportsRule.cs │ │ │ ├── IConditionFunction.cs │ │ │ ├── ICssCharsetRule.cs │ │ │ ├── ICssMediaRule.cs │ │ │ ├── ICssDocumentRule.cs │ │ │ ├── ICssRuleCreator.cs │ │ │ ├── ICssNode.cs │ │ │ ├── IKeyframeSelector.cs │ │ │ ├── ICssConditionRule.cs │ │ │ ├── IElementCssInlineStyle.cs │ │ │ ├── ICssFontFeatureValuesRule.cs │ │ │ ├── ICssMarginRule.cs │ │ │ ├── ICssNamespaceRule.cs │ │ │ └── ICssPageRule.cs │ │ ├── IDocumentFragment.cs │ │ ├── Navigator │ │ │ ├── INavigator.cs │ │ │ ├── INavigatorOnline.cs │ │ │ └── INavigatorStorageUtilities.cs │ │ ├── IPseudoElement.cs │ │ ├── IComment.cs │ │ ├── IHtmlAllCollection.cs │ │ ├── Media │ │ │ └── IMediaError.cs │ │ ├── IDomException.cs │ │ ├── ILoadableElement.cs │ │ ├── ILinkImport.cs │ │ ├── ILinkStyle.cs │ │ ├── ISettableTokenList.cs │ │ ├── Io │ │ │ └── IFile.cs │ │ ├── IBindable.cs │ │ └── IProcessingInstruction.cs │ ├── Dom │ │ ├── NodeFilter.cs │ │ ├── Constants │ │ │ ├── SimpleChoice.cs │ │ │ ├── DirectionMode.cs │ │ │ ├── ContentEditableMode.cs │ │ │ ├── DocumentReadyState.cs │ │ │ ├── WordBreak.cs │ │ │ ├── ShadowRootMode.cs │ │ │ ├── QuirksMode.cs │ │ │ ├── RangePosition.cs │ │ │ ├── TextTrackMode.cs │ │ │ ├── AdjacentPosition.cs │ │ │ ├── WheelMode.cs │ │ │ ├── MediaControllerPlaybackState.cs │ │ │ └── FilterResult.cs │ │ ├── MutationCallback.cs │ │ ├── DomEventHandler.cs │ │ ├── Html │ │ │ ├── HtmlRubyElement.cs │ │ │ ├── HtmlBigElement.cs │ │ │ ├── HtmlBoldElement.cs │ │ │ ├── HtmlCodeElement.cs │ │ │ ├── HtmlItalicElement.cs │ │ │ ├── HtmlPictureElement.cs │ │ │ ├── HtmlSpanElement.cs │ │ │ ├── HtmlStruckElement.cs │ │ │ ├── HtmlUnknownElement.cs │ │ │ ├── HtmlAddressElement.cs │ │ │ ├── HtmlSmallElement.cs │ │ │ ├── HtmlUnderlineElement.cs │ │ │ ├── HtmlEmphasizeElement.cs │ │ │ ├── HtmlRtElement.cs │ │ │ ├── HtmlStrikeElement.cs │ │ │ ├── HtmlStrongElement.cs │ │ │ ├── HtmlXmpElement.cs │ │ │ ├── HtmlDivElement.cs │ │ │ ├── HtmlHeadElement.cs │ │ │ ├── HtmlNoNewlineElement.cs │ │ │ ├── HtmlRbElement.cs │ │ │ ├── HtmlRpElement.cs │ │ │ ├── HtmlRtcElement.cs │ │ │ ├── HtmlTeletypeTextElement.cs │ │ │ ├── HtmlHrElement.cs │ │ │ ├── HtmlDefinitionListElement.cs │ │ │ ├── HtmlPlaintextElement.cs │ │ │ ├── HtmlNoEmbedElement.cs │ │ │ ├── HtmlPreElement.cs │ │ │ ├── HtmlSemanticElement.cs │ │ │ ├── HtmlNoFramesElement.cs │ │ │ ├── HtmlNoScriptElement.cs │ │ │ ├── HtmlBreakRowElement.cs │ │ │ ├── HtmlTableDataCellElement.cs │ │ │ ├── HtmlTableHeaderCellElement.cs │ │ │ ├── HtmlHeadingElement.cs │ │ │ ├── HtmlAppletElement.cs │ │ │ ├── HtmlUnorderedListElement.cs │ │ │ ├── HtmlBgsoundElement.cs │ │ │ ├── HtmlFontElement.cs │ │ │ ├── HtmlDirectoryElement.cs │ │ │ ├── HtmlBaseFontElement.cs │ │ │ ├── HtmlWbrElement.cs │ │ │ └── HtmlDataElement.cs │ │ ├── Css │ │ │ ├── ConditionFunctions │ │ │ │ └── EmptyCondition.cs │ │ │ ├── Constants │ │ │ │ ├── PlayState.cs │ │ │ │ ├── FontVariant.cs │ │ │ │ ├── StrokeLinejoin.cs │ │ │ │ ├── StrokeLinecap.cs │ │ │ │ ├── OverflowWrap.cs │ │ │ │ ├── ListPosition.cs │ │ │ │ ├── PointerAccuracy.cs │ │ │ │ ├── HoverAbility.cs │ │ │ │ ├── FontStyle.cs │ │ │ │ ├── Floating.cs │ │ │ │ ├── FontWeight.cs │ │ │ │ ├── OverflowMode.cs │ │ │ │ ├── TextAnchor.cs │ │ │ │ ├── BoxModel.cs │ │ │ │ ├── TextDecorationStyle.cs │ │ │ │ └── ClearMode.cs │ │ │ ├── Rules │ │ │ │ ├── CssViewportRule.cs │ │ │ │ └── CssConditionRule.cs │ │ │ ├── Properties │ │ │ │ ├── Text │ │ │ │ │ ├── CssTextJustifyProperty.cs │ │ │ │ │ └── CssWordBreakProperty.cs │ │ │ │ ├── CssUnknownProperty.cs │ │ │ │ └── Font │ │ │ │ │ ├── CssSrcProperty.cs │ │ │ │ │ └── CssUnicodeRangeProperty.cs │ │ │ ├── DocumentFunctions │ │ │ │ ├── UrlPrefixFunction.cs │ │ │ │ └── UrlFunction.cs │ │ │ └── MediaFeatures │ │ │ │ └── UnknownMediaFeature.cs │ │ ├── Svg │ │ │ ├── SvgSvgElement.cs │ │ │ ├── SvgCircleElement.cs │ │ │ ├── SvgDescElement.cs │ │ │ ├── SvgTitleElement.cs │ │ │ └── SvgForeignObjectElement.cs │ │ ├── Mathml │ │ │ ├── MathNumberElement.cs │ │ │ ├── MathTextElement.cs │ │ │ ├── MathOperatorElement.cs │ │ │ ├── MathStringElement.cs │ │ │ ├── MathIdentifierElement.cs │ │ │ └── MathAnnotationXmlElement.cs │ │ ├── AttrChangedCallback.cs │ │ └── Collections │ │ │ └── SettableTokenList.cs │ ├── Html │ │ ├── Submitters │ │ │ └── Json │ │ │ │ ├── JsonElement.cs │ │ │ │ └── JsonValue.cs │ │ ├── IFormSubmitter.cs │ │ ├── InputTypes │ │ │ ├── SubmitInputType.cs │ │ │ ├── PatternInputType.cs │ │ │ └── ButtonInputType.cs │ │ └── TextDataSetEntry.cs │ ├── Attributes │ │ ├── DomConstructorAttribute.cs │ │ ├── DomLiteralsAttribute.cs │ │ ├── DomNoInterfaceObjectAttribute.cs │ │ ├── DomLenientThisAttribute.cs │ │ └── DomHistoricalAttribute.cs │ ├── Parser │ │ └── Xml │ │ │ └── Tokens │ │ │ └── XmlEndOfFileToken.cs │ ├── IConfiguration.cs │ ├── Foundation │ │ ├── WeakReference.cs │ │ └── TaskPriority.cs │ ├── Extensions │ │ └── ContextExtensions.cs │ ├── IMarkupFormattable.cs │ ├── IStyleFormattable.cs │ └── AngleSharp.Core.csproj ├── Blazor.Host │ ├── wwwroot │ │ └── _framework │ │ │ ├── asmjs │ │ │ ├── dna.wasm │ │ │ └── dna.js.mem │ │ │ └── wasm │ │ │ └── dna.wasm │ ├── Host │ │ ├── Debugging │ │ │ ├── Models │ │ │ │ ├── SourceFileInfo.cs │ │ │ │ ├── PossibleBreakpointLocation.cs │ │ │ │ └── DebuggerInvocationException.cs │ │ │ ├── Discovery │ │ │ │ └── DebuggablePageInfo.cs │ │ │ └── Protocol │ │ │ │ └── MessageBase.cs │ │ └── Program.cs │ └── Program.cs ├── Blazor.Runtime │ ├── VirtualDom │ │ ├── VDomElementKey.cs │ │ ├── VDomAttribute.cs │ │ ├── VDomComponent.cs │ │ ├── VDomItemType.cs │ │ └── VEventHandler.cs │ ├── Interop │ │ ├── Window.cs │ │ ├── Env.cs │ │ ├── Browser.cs │ │ ├── JavaScript.cs │ │ ├── Document.cs │ │ ├── Startup.cs │ │ └── FakeMvcTypes.cs │ ├── Components │ │ ├── BlazorContext.cs │ │ └── IRazorComponentFactory.cs │ └── Blazor.Runtime.csproj └── Blazor.Compiler │ └── Properties │ └── launchSettings.json ├── .gitignore ├── template ├── MyApplication │ ├── Index.cshtml │ ├── sw-file-icon.png │ ├── sw-file-previewimage.png │ ├── _ViewImports.cshtml │ ├── wwwroot │ │ ├── css │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── index.html │ │ └── sample-data │ │ │ └── weather.json │ ├── Program.cs │ ├── Shared │ │ └── _Layout.cshtml │ ├── Counter.cshtml │ ├── .template.config │ │ └── template.json │ ├── Properties │ │ ├── sw-launchSettings.json │ │ └── launchSettings.json │ ├── MyApplication.csproj │ └── _preprocess.xml └── Blazor.VSExtension │ ├── packages.config │ └── Properties │ └── template-builder.props ├── version.props ├── artifacts └── placeholder.txt ├── NuGet.config └── CODE-OF-CONDUCT.md /samples/ClientServerApp/.gitignore: -------------------------------------------------------------------------------- 1 | launchSettings.json 2 | -------------------------------------------------------------------------------- /src/DNA/.gitignore: -------------------------------------------------------------------------------- 1 | Debug 2 | native/Debug 3 | native/x64 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | *.suo 4 | *.user 5 | *.nupkg 6 | .vs/ 7 | /packages/ 8 | /artifacts/ -------------------------------------------------------------------------------- /template/MyApplication/Index.cshtml: -------------------------------------------------------------------------------- 1 |

Hello, world!

2 |

Welcome to your new single-page application.

3 | -------------------------------------------------------------------------------- /template/MyApplication/sw-file-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/template/MyApplication/sw-file-icon.png -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/Index.cshtml: -------------------------------------------------------------------------------- 1 |

Hello, world!

2 |

Welcome to your new single-page application.

3 | -------------------------------------------------------------------------------- /src/AngleSharp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleToAttribute("Blazor.Compiler")] 4 | -------------------------------------------------------------------------------- /template/MyApplication/sw-file-previewimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/template/MyApplication/sw-file-previewimage.png -------------------------------------------------------------------------------- /src/Blazor.Host/wwwroot/_framework/asmjs/dna.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/src/Blazor.Host/wwwroot/_framework/asmjs/dna.wasm -------------------------------------------------------------------------------- /src/Blazor.Host/wwwroot/_framework/wasm/dna.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/src/Blazor.Host/wwwroot/_framework/wasm/dna.wasm -------------------------------------------------------------------------------- /src/Blazor.Host/wwwroot/_framework/asmjs/dna.js.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/src/Blazor.Host/wwwroot/_framework/asmjs/dna.js.mem -------------------------------------------------------------------------------- /src/DNA/corlib/System/IDisposable.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public interface IDisposable { 5 | void Dispose(); 6 | } 7 | } 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /template/MyApplication/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Blazor.Components.RazorComponent 2 | @layout ./Shared/_Layout.cshtml 3 | @using Blazor.Util 4 | @using System.Net.Http 5 | -------------------------------------------------------------------------------- /version.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.2.2 4 | preview 5 | 6 | 7 | -------------------------------------------------------------------------------- /artifacts/placeholder.txt: -------------------------------------------------------------------------------- 1 | This file exists just to ensure the "artifacts" directory exists. 2 | 3 | Otherwise, NuGet restore fails because the directory is listed as a package source. 4 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/VirtualDom/VDomElementKey.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.VirtualDom 2 | { 3 | public struct VDomElementKey 4 | { 5 | public string Value { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /template/Blazor.VSExtension/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.ComponentModel.DataAnnotations/ValidationAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace System.ComponentModel.DataAnnotations 2 | { 3 | public class ValidationAttribute : Attribute 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/template/MyApplication/wwwroot/css/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/SeekOrigin.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum SeekOrigin : int { 5 | Begin = 0, 6 | Current = 1, 7 | End = 2, 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/DNA/native/System.Attribute.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_ATTRIBUTE_H) 2 | #define __SYSTEM_ATTRIBUTE_H 3 | 4 | typedef struct tSystemAttribute_ tSystemAttribute; 5 | struct tSystemAttribute_ { 6 | }; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/FileAccess.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileAccess : int { 5 | Read = 1, 6 | Write = 2, 7 | ReadWrite = Read | Write, 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/ConsoleModifiers.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | [Flags] 5 | public enum ConsoleModifiers { 6 | Alt = 1, 7 | Shift = 2, 8 | Control = 4 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/VirtualDom/VDomAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.VirtualDom 2 | { 3 | public struct VDomAttribute 4 | { 5 | public string Name { get; set; } 6 | public object Value { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/DNA/native/src/Reflection.h: -------------------------------------------------------------------------------- 1 | #if !defined(__REFLECTION_H) 2 | #define __REFLECTION 3 | 4 | #include "Types.h" 5 | 6 | tAsyncCall* Reflection_MemberInfo_GetCustomAttributes(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | 8 | #endif -------------------------------------------------------------------------------- /src/Blazor.Runtime/VirtualDom/VDomComponent.cs: -------------------------------------------------------------------------------- 1 | using Blazor.Components; 2 | 3 | namespace Blazor.VirtualDom 4 | { 5 | public struct VDomComponent 6 | { 7 | public Component Component { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Globalization/DigitShapes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Globalization { 4 | public enum DigitShapes { 5 | Context = 0, 6 | None = 1, 7 | NativeNational = 2 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Blazor-Hackathon/HEAD/samples/ClientServerApp/ClientServerApp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/AngleSharp/Css/Values/ITimingFunction.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css.Values 2 | { 3 | /// 4 | /// Represents a general timing function. 5 | /// 6 | public interface ITimingFunction 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/DayOfWeek.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public enum DayOfWeek { 5 | Sunday, 6 | Monday, 7 | Tuesday, 8 | Wednesday, 9 | Thursday, 10 | Friday, 11 | Saturday 12 | } 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/OperationCanceledException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System 6 | { 7 | public class OperationCanceledException : Exception 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IMediaFeatureFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Css; 4 | using System; 5 | 6 | interface IMediaFeatureFactory 7 | { 8 | MediaFeature Create(String name); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/Media/IAudioInfo.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services.Media 2 | { 3 | /// 4 | /// Contains information about a sound file. 5 | /// 6 | public interface IAudioInfo : IMediaInfo 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/FileNotFoundException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public class FileNotFoundException : IOException { 5 | 6 | public FileNotFoundException(string msg) : base(msg) { } 7 | 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Blazor.Components.RazorComponent 2 | @layout ./Shared/_Layout.cshtml 3 | @using Blazor.Util 4 | @using ClientServerApp.Client 5 | @using ClientServerApp.Shared 6 | @using System.Net.Http 7 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/FileShare.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileShare : int { 5 | None = 0, 6 | Read = 1, 7 | Write = 2, 8 | ReadWrite = 3, 9 | Delete = 4, 10 | Inheritable = 16, 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/DateTimeOffset.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Runtime.CompilerServices; 4 | using System.Globalization; 5 | using System.Text; 6 | namespace System { 7 | public struct DateTimeOffset { 8 | 9 | 10 | } 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/IComparable.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | 5 | public interface IComparable { 6 | int CompareTo(object obj); 7 | } 8 | 9 | public interface IComparable { 10 | int CompareTo(T x); 11 | } 12 | 13 | } 14 | 15 | #endif -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/FileMode.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileMode : int { 5 | CreateNew = 1, 6 | Create = 2, 7 | Open = 3, 8 | OpenOrCreate = 4, 9 | Truncate = 5, 10 | Append = 6, 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/VirtualDom/VDomItemType.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.VirtualDom 2 | { 3 | public enum VDomItemType : int 4 | { 5 | Blank = 0, 6 | Element = 1, 7 | TextNode = 2, 8 | Attribute = 3, 9 | Component = 4 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /template/MyApplication/Program.cs: -------------------------------------------------------------------------------- 1 | using Blazor.Routing; 2 | 3 | namespace MyApplication 4 | { 5 | public class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Router.MountInElement("app"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/IFormatProvider.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System { 8 | public interface IFormatProvider { 9 | object GetFormat(Type formatType); 10 | } 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/IOException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public class IOException : SystemException { 5 | 6 | public IOException() : base("I/O Error") { } 7 | public IOException(string message) : base(message) { } 8 | 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/FormatException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public class FormatException : SystemException { 5 | public FormatException() : base("Invalid Format.") { } 6 | public FormatException(string msg) : base(msg) { } 7 | } 8 | } 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /template/MyApplication/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 | @RenderBody() 8 |
9 |
10 |
-------------------------------------------------------------------------------- /src/DNA/corlib/System.ComponentModel.DataAnnotations/RequiredAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.ComponentModel.DataAnnotations 6 | { 7 | public class RequiredAttribute : ValidationAttribute 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/Program.cs: -------------------------------------------------------------------------------- 1 | using Blazor.Routing; 2 | 3 | namespace ClientServerApp.Client 4 | { 5 | public class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Router.MountInElement("app"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Css/Values/IImageSource.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css.Values 2 | { 3 | /// 4 | /// Basic interface for all image sources 5 | /// (linear-gradient, radial-gradient, URL, solid, ...). 6 | /// 7 | public interface IImageSource 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 | @RenderBody() 8 |
9 |
10 |
-------------------------------------------------------------------------------- /src/DNA/native/src/System.Reflection.MethodInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_METHODINFO_H) 2 | #define __SYSTEM_REFLECTION_METHODINFO_H 3 | 4 | #include "System.Reflection.MethodBase.h" 5 | 6 | typedef struct tMethodInfo_ tMethodInfo; 7 | struct tMethodInfo_ { 8 | tMethodBase methodBase; 9 | }; 10 | 11 | #endif -------------------------------------------------------------------------------- /samples/JSLibs/JSLibs.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard1.6 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/AngleSharp/Css/IPropertyValue.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css 2 | { 3 | using AngleSharp.Dom.Css; 4 | using System; 5 | 6 | interface IPropertyValue 7 | { 8 | String CssText { get; } 9 | 10 | CssValue Original { get; } 11 | 12 | CssValue ExtractFor(String name); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/RequestProcessors/IRequestProcessor.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network.RequestProcessors 2 | { 3 | using System.Threading.Tasks; 4 | 5 | interface IRequestProcessor 6 | { 7 | IDownload Download { get; } 8 | 9 | Task ProcessAsync(ResourceRequest request); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IInputTypeFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Html; 4 | using AngleSharp.Html.InputTypes; 5 | using System; 6 | 7 | interface IInputTypeFactory 8 | { 9 | BaseInputType Create(IHtmlInputElement input, String type); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/ILinkRelationFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Html; 4 | using AngleSharp.Html.LinkRels; 5 | using System; 6 | 7 | interface ILinkRelationFactory 8 | { 9 | BaseLinkRelation Create(HtmlLinkElement link, String rel); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Runtime.CompilerServices/VoidTaskResult.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// Used with Task(of void) 7 | internal struct VoidTaskResult { 8 | } 9 | } -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlHrElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the hr HTML element. 7 | /// 8 | [DomName("HTMLHRElement")] 9 | public interface IHtmlHrElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgSvgElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the svg SVG element. 7 | /// 8 | [DomName("SVGSVGElement")] 9 | public interface ISvgSvgElement : ISvgElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Xml/IXmlDocument.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Xml 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// The interface represent an XML document. 7 | /// 8 | [DomName("XMLDocument")] 9 | public interface IXmlDocument : IDocument 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IElementFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom; 4 | using System; 5 | 6 | interface IElementFactory 7 | where TElement : Element 8 | { 9 | TElement Create(Document document, String localName, String prefix = null); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlDivElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the div HTML element. 7 | /// 8 | [DomName("HTMLDivElement")] 9 | public interface IHtmlDivElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlPreElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the pre HTML element. 7 | /// 8 | [DomName("HTMLPreElement")] 9 | public interface IHtmlPreElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgTitleElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the title SVG element. 7 | /// 8 | [DomName("SVGTitleElement")] 9 | public interface ISvgTitleElement : ISvgElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/Window.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.Runtime.Interop 2 | { 3 | public class Window : JavaScriptInvocation 4 | { 5 | public static Document Document => JavaScript.Document; 6 | 7 | internal Window(JSObjectHandle currentHandle) : base(currentHandle) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Globalization/CalendarWeekRule.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System.Globalization { 8 | public enum CalendarWeekRule { 9 | FirstDay = 0, 10 | FirstFullWeek = 1, 11 | FirstFourDayWeek = 2 12 | } 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlHeadElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the head HTML element. 7 | /// 8 | [DomName("HTMLHeadElement")] 9 | public interface IHtmlHeadElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlSpanElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the span HTML element. 7 | /// 8 | [DomName("HTMLSpanElement")] 9 | public interface IHtmlSpanElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgCircleElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the circle SVG element. 7 | /// 8 | [DomName("SVGCircleElement")] 9 | public interface ISvgCircleElement : ISvgElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Components/BlazorContext.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.Runtime.Components 2 | { 3 | public class BlazorContext 4 | { 5 | public string AbsoluteUrl { get; private set; } 6 | 7 | public BlazorContext(string absoluteUrl) 8 | { 9 | AbsoluteUrl = absoluteUrl; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Shared/ClientServerApp.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard1.3 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlBreakRowElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the br HTML element. 7 | /// 8 | [DomName("HTMLBRElement")] 9 | public interface IHtmlBreakRowElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgDescriptionElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the desc SVG element. 7 | /// 8 | [DomName("SVGDescElement")] 9 | public interface ISvgDescriptionElement : ISvgElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Runtime.CompilerServices/IAsyncMethodBuilder.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | internal interface IAsyncMethodBuilder 7 | { 8 | void PreBoxInitialization(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/IAsyncResult.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Threading; 4 | 5 | namespace System { 6 | public interface IAsyncResult { 7 | 8 | object AsyncState { get;} 9 | WaitHandle AsyncWaitHandle { get; } 10 | bool CompletedSynchronously { get; } 11 | bool IsCompleted { get; } 12 | 13 | } 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/DNA/native/src/System.Reflection.MemberInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_MEMBERINFO_H) 2 | #define __SYSTEM_REFLECTION_MEMBERINFO_H 3 | 4 | 5 | typedef struct tMemberInfo_ tMemberInfo; 6 | struct tMemberInfo_ { 7 | // Keep in sync with System.Reflection.MemberInfo.cs 8 | HEAP_PTR ownerType; 9 | HEAP_PTR name; 10 | }; 11 | 12 | #endif -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlAudioElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the audio HTML element. 7 | /// 8 | [DomName("HTMLAudioElement")] 9 | public interface IHtmlAudioElement : IHtmlMediaElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlParagraphElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the p HTML element. 7 | /// 8 | [DomName("HTMLParagraphElement")] 9 | public interface IHtmlParagraphElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlUnknownElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents an unknown HTML element. 7 | /// 8 | [DomName("HTMLUnknownElement")] 9 | public interface IHtmlUnknownElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Components/IRazorComponentFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Blazor.Components 8 | { 9 | public interface IRazorComponentFactory 10 | { 11 | RazorComponent Instantiate(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/DirectoryNotFoundException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public class DirectoryNotFoundException : SystemException { 5 | 6 | public DirectoryNotFoundException() : base("Directory not found.") { } 7 | public DirectoryNotFoundException(string msg) : base(msg) { } 8 | 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/SearchPattern.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | internal class SearchPattern { 5 | 6 | internal static readonly char[] WildcardChars = { '*', '?' }; 7 | internal static readonly char[] InvalidChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; 8 | 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlDocument.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Serves as an entry point to the content of an HTML document. 7 | /// 8 | [DomName("HTMLDocument")] 9 | public interface IHtmlDocument : IDocument 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlHeadingElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the heading HTML element(s). 7 | /// 8 | [DomName("HTMLHeadingElement")] 9 | public interface IHtmlHeadingElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlUnorderedListElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents an ul HTML element. 7 | /// 8 | [DomName("HTMLUListElement")] 9 | public interface IHtmlUnorderedListElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Blazor.Runtime.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Library 6 | netstandard1.6 7 | $(MSBuildThisFileDirectory)../../artifacts/ 8 | 9 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTableCaptionElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the caption HTML element. 7 | /// 8 | [DomName("HTMLTableCaptionElement")] 9 | public interface IHtmlTableCaptionElement : IHtmlElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/NodeFilter.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// The signature for a NodeFilter callback function. 5 | /// 6 | /// The node to examine. 7 | /// The result after the examination of the node. 8 | public delegate FilterResult NodeFilter(INode node); 9 | } 10 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgForeignObjectElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the foreignobject SVG element. 7 | /// 8 | [DomName("SVGForeignObjectElement")] 9 | public interface ISvgForeignObjectElement : ISvgElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTableDataCellElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the td HTML element. 7 | /// 8 | [DomName("HTMLTableDataCellElement")] 9 | public interface IHtmlTableDataCellElement : IHtmlTableCellElement 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/Env.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazor.Runtime 6 | { 7 | public static class Env 8 | { 9 | private static bool _isServer = false; 10 | 11 | public static bool IsServer => _isServer; 12 | public static bool IsClient => !_isServer; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Reflection/TypeInfo.cs: -------------------------------------------------------------------------------- 1 | namespace System.Reflection 2 | { 3 | public class TypeInfo : MemberInfo 4 | { 5 | private readonly Type _type; 6 | 7 | internal TypeInfo(Type type) : base(type, type.Name) 8 | { 9 | _type = type; 10 | } 11 | 12 | public bool IsValueType => _type.IsValueType; 13 | } 14 | } -------------------------------------------------------------------------------- /src/DNA/corlib/System/AggregateException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System 6 | { 7 | public class AggregateException : Exception 8 | { 9 | public AggregateException(Exception exception) : base("Error occurred: " + exception.Message, exception) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /template/MyApplication/Counter.cshtml: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of a component.

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @functions { 10 | int currentCount; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Reflection/AssemblyName.cs: -------------------------------------------------------------------------------- 1 | namespace System.Reflection 2 | { 3 | public sealed class AssemblyName 4 | { 5 | public AssemblyName() {} 6 | 7 | public AssemblyName(string assemblyName) : this() 8 | { 9 | Name = assemblyName; 10 | } 11 | 12 | public string Name { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /template/MyApplication/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Loading...
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/Media/IResourceInfo.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services.Media 2 | { 3 | /// 4 | /// Specifies general resource information. 5 | /// 6 | public interface IResourceInfo 7 | { 8 | /// 9 | /// Gets the source of the resource. 10 | /// 11 | Url Source { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Reflection/IntrospectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Reflection 6 | { 7 | public static class IntrospectionExtensions 8 | { 9 | public static TypeInfo GetTypeInfo(this Type type) 10 | { 11 | return new TypeInfo(type); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/SimpleChoice.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// Contains simple choices. 5 | /// 6 | enum SimpleChoice : byte 7 | { 8 | /// 9 | /// Yes. 10 | /// 11 | Yes, 12 | /// 13 | /// No. 14 | /// 15 | No 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Html/Submitters/Json/JsonElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html.Submitters.Json 2 | { 3 | using System; 4 | 5 | abstract class JsonElement 6 | { 7 | public virtual JsonElement this[String key] 8 | { 9 | get { throw new InvalidOperationException(); } 10 | set { throw new InvalidOperationException(); } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlBodyElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using AngleSharp.Dom.Events; 5 | 6 | /// 7 | /// Represents the body HTML element. 8 | /// 9 | [DomName("HTMLBodyElement")] 10 | public interface IHtmlBodyElement : IHtmlElement, IWindowEventHandlers 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlFormControlsCollection.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents a collection of HTML form controls. 7 | /// 8 | [DomName("HTMLFormControlsCollection")] 9 | public interface IHtmlFormControlsCollection : IHtmlCollection 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssComment.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using System; 4 | 5 | /// 6 | /// Represents a comment in the CSSOM. 7 | /// 8 | public interface ICssComment : ICssNode 9 | { 10 | /// 11 | /// Gets the contained comment data. 12 | /// 13 | String Data { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/MutationCallback.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// Defines the callback signature for a mutation event. 5 | /// 6 | /// The sequence of mutations. 7 | /// The observer. 8 | public delegate void MutationCallback(IMutationRecord[] mutations, MutationObserver observer); 9 | } 10 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Globalization/CultureTypes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Globalization { 4 | [Flags] 5 | public enum CultureTypes { 6 | NeutralCultures = 1, 7 | SpecificCultures = 2, 8 | InstalledWin32Cultures = 4, 9 | AllCultures = 7, 10 | UserCustomCulture = 8, 11 | ReplacementCultures = 16, 12 | WindowsOnlyCultures = 32, 13 | FrameworkCultures = 64, 14 | } 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /src/DNA/native/src/System.Reflection.MethodBase.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_METHODBASE_H) 2 | #define __SYSTEM_REFLECTION_METHODBASE_H 3 | 4 | typedef struct tMethodBase_ tMethodBase; 5 | struct tMethodBase_ { 6 | // Keep in sync with MethodBase class in .NET corlib code 7 | HEAP_PTR ownerType; 8 | HEAP_PTR name; 9 | tMD_MethodDef *methodDef; // Not accessed from .NET code 10 | }; 11 | 12 | #endif -------------------------------------------------------------------------------- /samples/JSLibs/Bootstrap/Modal.cs: -------------------------------------------------------------------------------- 1 | using Blazor.Runtime.Interop; 2 | using static Blazor.Runtime.Interop.Document; 3 | 4 | namespace JSLibs.Bootstrap 5 | { 6 | public class Modal : JSObject 7 | { 8 | public Modal(Node node) 9 | : base((JSObjectHandle)JSObjectHandle.Global.CallNew("Modal", node)) 10 | { 11 | } 12 | 13 | public void Show() => Call("show"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Attributes/DomConstructorAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Attributes 2 | { 3 | using System; 4 | 5 | /// 6 | /// This attribute is used to mark a constructor as being 7 | /// accessible from scripts. 8 | /// 9 | [AttributeUsage(AttributeTargets.Constructor, Inherited = false)] 10 | public sealed class DomConstructorAttribute : Attribute 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IDocumentFragment.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// The DocumentFragment interface represents a minimal document object 7 | /// that has no parent. 8 | /// 9 | [DomName("DocumentFragment")] 10 | public interface IDocumentFragment : INode, IParentNode, INonElementParentNode 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Navigator/INavigator.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Navigator 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the navigator information of a browsing context. 7 | /// 8 | [DomName("Navigator")] 9 | public interface INavigator : INavigatorId, INavigatorContentUtilities, INavigatorStorageUtilities, INavigatorOnline 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Reflection/RuntimeReflectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Reflection 6 | { 7 | public static class RuntimeReflectionExtensions 8 | { 9 | public static IEnumerable GetRuntimeProperties(this Type type) 10 | { 11 | return type.GetProperties(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Globalization/GregorianCalendarTypes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System.Globalization { 8 | public enum GregorianCalendarTypes { 9 | Localized = 1, 10 | USEnglish = 2, 11 | MiddleEastFrench = 9, 12 | Arabic = 10, 13 | TransliteratedEnglish = 11, 14 | TransliteratedFrench = 12, 15 | } 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/DomEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Dom.Events; 4 | using System; 5 | 6 | /// 7 | /// Defines the callback signature for an event. 8 | /// 9 | /// The callback this argument. 10 | /// The event arguments. 11 | public delegate void DomEventHandler(Object sender, Event ev); 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IPseudoElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | using AngleSharp.Dom.Css; 5 | 6 | /// 7 | /// The PseudoElement interface is used for representing CSS 8 | /// pseudo-elements. 9 | /// 10 | [DomName("PseudoElement")] 11 | [DomNoInterfaceObject] 12 | public interface IPseudoElement : IStyleUtilities 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Attributes/DomLiteralsAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Attributes 2 | { 3 | using System; 4 | 5 | /// 6 | /// This attribute is used to mark an enum as being just a collection of 7 | /// constant string values (with the names being the strings). 8 | /// 9 | [AttributeUsage(AttributeTargets.Enum)] 10 | public sealed class DomLiteralsAttribute : Attribute 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlRubyElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The ruby HTML element. 8 | /// 9 | sealed class HtmlRubyElement : HtmlElement 10 | { 11 | public HtmlRubyElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Ruby, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/DNA/native/src/System.Reflection.PropertyInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_PROPERTYINFO_H) 2 | #define __SYSTEM_REFLECTION_PROPERTYINFO_H 3 | 4 | typedef struct tPropertyInfo_ tPropertyInfo; 5 | struct tPropertyInfo_ { 6 | // Keep in sync with System.Reflection.PropertyInfo.cs 7 | HEAP_PTR ownerType; 8 | HEAP_PTR name; 9 | HEAP_PTR propertyType; 10 | 11 | tMD_Property* pMetaData; 12 | IDX_TABLE index; 13 | }; 14 | 15 | #endif -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/ConditionFunctions/EmptyCondition.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using System; 4 | using System.IO; 5 | 6 | sealed class EmptyCondition : CssNode, IConditionFunction 7 | { 8 | public Boolean Check() 9 | { 10 | return true; 11 | } 12 | 13 | public override void ToCss(TextWriter writer, IStyleFormatter formatter) 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// The SVGElement interface represents any SVG element. Some elements directly 7 | /// implement this interface, other implement it via an interface that inherit it. 8 | /// 9 | [DomName("SVGElement")] 10 | public interface ISvgElement : IElement 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/DNA/native/src/JSInterop.h: -------------------------------------------------------------------------------- 1 | #if !defined (__JSINTEROP_H) 2 | #define __JSINTEROP_H 3 | #include "CLIFile.h" 4 | #include "System.RuntimeType.h" 5 | 6 | tAsyncCall* Framework_JSInterop_ToHeapRef(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | tAsyncCall* Framework_JSInterop_FromHeapRefImpl(PTR pThis_, PTR pParams, PTR pReturnValue); 8 | tAsyncCall* Framework_JSInterop_Activator_CreateInstance(PTR pThis_, PTR pParams, PTR pReturnValue); 9 | #endif 10 | -------------------------------------------------------------------------------- /template/MyApplication/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "", 4 | "classifications": [ "Blazor" ], 5 | "name": "Blazor Sample Application", 6 | "identity": "Blazor.Sample.CSharp", 7 | "groupIdentity":"Blazor.Sample", 8 | "shortName": "blazor", 9 | "tags": { 10 | "language": "C#" 11 | }, 12 | "sourceName": "MyApplication", 13 | "preferNameDirectory": true 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IComment.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// The Comment interface represents textual notations within markup; 7 | /// although it is generally not visually shown, such comments are 8 | /// available to be read in the source view. 9 | /// 10 | [DomName("Comment")] 11 | public interface IComment : ICharacterData 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/AngleSharp/Network/OriginBehavior.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | /// 4 | /// The default origin behavior states. 5 | /// 6 | public enum OriginBehavior : byte 7 | { 8 | /// 9 | /// Data is gathered. 10 | /// 11 | Taint, 12 | /// 13 | /// Data is discarded in NO CORS. 14 | /// 15 | Fail 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlBigElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The big HTML element. 8 | /// 9 | sealed class HtmlBigElement : HtmlElement 10 | { 11 | public HtmlBigElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Big, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlBoldElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The bold HTML element. 8 | /// 9 | sealed class HtmlBoldElement : HtmlElement 10 | { 11 | public HtmlBoldElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.B, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/Media/IMediaInfo.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services.Media 2 | { 3 | using AngleSharp.Dom.Media; 4 | 5 | /// 6 | /// Contains information about a media resource. 7 | /// 8 | public interface IMediaInfo : IResourceInfo 9 | { 10 | /// 11 | /// Gets the controller responsible for the media. 12 | /// 13 | IMediaController Controller { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlCodeElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The code HTML element. 8 | /// 9 | sealed class HtmlCodeElement : HtmlElement 10 | { 11 | public HtmlCodeElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Code, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlItalicElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The i HTML element. 8 | /// 9 | sealed class HtmlItalicElement : HtmlElement 10 | { 11 | public HtmlItalicElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.I, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlPictureElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML picture element. 8 | /// 9 | sealed class HtmlPictureElement : HtmlElement 10 | { 11 | public HtmlPictureElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Picture, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlSpanElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML span element. 8 | /// 9 | sealed class HtmlSpanElement : HtmlElement, IHtmlSpanElement 10 | { 11 | public HtmlSpanElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Span, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlStruckElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The s HTML element. 8 | /// 9 | sealed class HtmlStruckElement : HtmlElement 10 | { 11 | public HtmlStruckElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.S, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlUnknownElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | 5 | /// 6 | /// The class for an unknown HTML element. 7 | /// 8 | sealed class HtmlUnknownElement : HtmlElement, IHtmlUnknownElement 9 | { 10 | public HtmlUnknownElement(Document owner, String localName, String prefix = null) 11 | : base(owner, localName, prefix) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Svg/SvgSvgElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the svg element of the SVG DOM. 8 | /// 9 | sealed class SvgSvgElement : SvgElement, ISvgSvgElement 10 | { 11 | public SvgSvgElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Svg, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Blazor.Compiler/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "RazorRenderer": { 4 | "commandName": "Project", 5 | "commandLineArgs": "..\\..\\samples\\ClientServerApp\\ClientServerApp.Client\\ ClientServerApp.Client ..\\..\\samples\\ClientServerApp\\ClientServerApp.Client\\bin\\Debug\\netcoreapp1.0\\ClientServerApp.Client.dll ..\\..\\samples\\ClientServerApp\\ClientServerApp.Client\\bin\\Debug\\netcoreapp1.0\\ClientServerApp.Shared.dll" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AngleSharp/Css/Values/ITransform.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css.Values 2 | { 3 | /// 4 | /// Functionality for computing transformation. 5 | /// 6 | public interface ITransform 7 | { 8 | /// 9 | /// Computes the matrix for the given transformation. 10 | /// 11 | /// The transformation matrix representation. 12 | TransformMatrix ComputeMatrix(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlAddressElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The address HTML element. 8 | /// 9 | sealed class HtmlAddressElement : HtmlElement 10 | { 11 | public HtmlAddressElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Address, prefix, NodeFlags.Special) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlSmallElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The small HTML element. 8 | /// 9 | sealed class HtmlSmallElement : HtmlElement 10 | { 11 | public HtmlSmallElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Small, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlUnderlineElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The u HTML element. 8 | /// 9 | sealed class HtmlUnderlineElement : HtmlElement 10 | { 11 | public HtmlUnderlineElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.U, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IHtmlAllCollection.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// An HTMLAllCollection is always rooted at document and matching all 7 | /// elements. It represents the tree of elements in a one-dimensional 8 | /// fashion. 9 | /// 10 | [DomName("HTMLAllCollection")] 11 | public interface IHtmlAllCollection : IHtmlCollection 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlEmphasizeElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The em HTML element. 8 | /// 9 | sealed class HtmlEmphasizeElement : HtmlElement 10 | { 11 | public HtmlEmphasizeElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Em, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlRtElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The rt element. 8 | /// 9 | sealed class HtmlRtElement : HtmlElement 10 | { 11 | public HtmlRtElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Rt, prefix, NodeFlags.ImplicitelyClosed | NodeFlags.ImpliedEnd) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlStrikeElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The strike HTML element. 8 | /// 9 | sealed class HtmlStrikeElement : HtmlElement 10 | { 11 | public HtmlStrikeElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Strike, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlStrongElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The strong HTML element. 8 | /// 9 | sealed class HtmlStrongElement : HtmlElement 10 | { 11 | public HtmlStrongElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Strong, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlXmpElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The xmp HTML element. 8 | /// 9 | sealed class HtmlXmpElement : HtmlElement 10 | { 11 | public HtmlXmpElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Xmp, prefix, NodeFlags.Special | NodeFlags.LiteralText) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/InvalidOperationException.cs: -------------------------------------------------------------------------------- 1 | namespace System { 2 | public class InvalidOperationException : SystemException { 3 | 4 | public InvalidOperationException() 5 | : base("Operation is not valid due to the current state of the object") { } 6 | 7 | public InvalidOperationException(string message) : base(message) { } 8 | 9 | public InvalidOperationException(string message, Exception innerException) 10 | : base(message, innerException) { } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /template/MyApplication/Properties/sw-launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "IIS Express": { 4 | "commandName": "IISExpress", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "LAUNCHER_PATH": "dotnet", 8 | "LAUNCHER_ARGS": "blazor serve" 9 | } 10 | }, 11 | "MyApplication": { 12 | "commandName": "Executable", 13 | "executablePath": "dotnet", 14 | "commandLineArgs": "blazor serve" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlDivElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML div element. 8 | /// 9 | sealed class HtmlDivElement : HtmlElement, IHtmlDivElement 10 | { 11 | public HtmlDivElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Div, prefix, NodeFlags.Special) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlHeadElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML head element. 8 | /// 9 | sealed class HtmlHeadElement : HtmlElement, IHtmlHeadElement 10 | { 11 | public HtmlHeadElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Head, prefix, NodeFlags.Special) 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlNoNewlineElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The nobr HTML element. 8 | /// 9 | sealed class HtmlNoNewlineElement : HtmlElement 10 | { 11 | public HtmlNoNewlineElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.NoBr, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlRbElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The rb HTML element. 8 | /// 9 | sealed class HtmlRbElement : HtmlElement 10 | { 11 | public HtmlRbElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Rb, prefix, NodeFlags.ImplicitelyClosed | NodeFlags.ImpliedEnd) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlRpElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The rp HTML element. 8 | /// 9 | sealed class HtmlRpElement : HtmlElement 10 | { 11 | public HtmlRpElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Rp, prefix, NodeFlags.ImplicitelyClosed | NodeFlags.ImpliedEnd) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Svg/SvgCircleElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the circle element of the SVG DOM. 8 | /// 9 | sealed class SvgCircleElement : SvgElement, ISvgCircleElement 10 | { 11 | public SvgCircleElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Circle, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/IndexOutOfRangeException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public class IndexOutOfRangeException : SystemException { 5 | 6 | public IndexOutOfRangeException() : base("Array index is out of range.") { } 7 | 8 | public IndexOutOfRangeException(string message) : base(message) { } 9 | 10 | public IndexOutOfRangeException(string message, Exception innerException) 11 | : base(message, innerException) { 12 | } 13 | 14 | } 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/PlayState.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration over all various play states. 5 | /// 6 | public enum PlayState : byte 7 | { 8 | /// 9 | /// The animation is currently playing. 10 | /// 11 | Running, 12 | /// 13 | /// The animation is currently paused. 14 | /// 15 | Paused 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlRtcElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The rtc HTML element. 8 | /// 9 | sealed class HtmlRtcElement : HtmlElement 10 | { 11 | public HtmlRtcElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Rtc, prefix, NodeFlags.ImplicitelyClosed | NodeFlags.ImpliedEnd) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlTeletypeTextElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The tt HTML element. 8 | /// 9 | sealed class HtmlTeletypeTextElement : HtmlElement 10 | { 11 | public HtmlTeletypeTextElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Tt, prefix, NodeFlags.HtmlFormatting) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /template/MyApplication/MyApplication.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp1.0 5 | exe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/DirectionMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// An enumeration with all dir modes. 5 | /// 6 | public enum DirectionMode : byte 7 | { 8 | /// 9 | /// Text and other elements go from left to right. 10 | /// 11 | Ltr, 12 | /// 13 | /// Text and other elements go from right to left 14 | /// 15 | Rtl 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlHrElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the hr element. 8 | /// 9 | sealed class HtmlHrElement : HtmlElement, IHtmlHrElement 10 | { 11 | public HtmlHrElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Hr, prefix, NodeFlags.Special | NodeFlags.SelfClosing) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/ILoader.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// Represents the basic interface for all loaders. 7 | /// 8 | public interface ILoader 9 | { 10 | /// 11 | /// Gets the currently active downloads. 12 | /// 13 | /// The downloads in progress. 14 | IEnumerable GetDownloads(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlDefinitionListElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML dl element. 8 | /// 9 | sealed class HtmlDefinitionListElement : HtmlElement 10 | { 11 | public HtmlDefinitionListElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Dl, prefix, NodeFlags.Special) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Mathml/MathNumberElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Mathml 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The mn math element. 8 | /// 9 | sealed class MathNumberElement : MathElement 10 | { 11 | public MathNumberElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Mn, prefix, NodeFlags.MathTip | NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Mathml/MathTextElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Mathml 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The mtext math element. 8 | /// 9 | sealed class MathTextElement : MathElement 10 | { 11 | public MathTextElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Mtext, prefix, NodeFlags.MathTip | NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssSupportsRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents a ‘@supports’ CSS rule. 7 | /// 8 | [DomName("CSSSupportsRule")] 9 | public interface ICssSupportsRule : ICssConditionRule 10 | { 11 | /// 12 | /// Gets the condition of the supports rule. 13 | /// 14 | IConditionFunction Condition { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Media/IMediaError.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Media 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Stores information about media errors. 7 | /// 8 | [DomName("MediaError")] 9 | public interface IMediaError 10 | { 11 | /// 12 | /// Gets the code that represents the media error. 13 | /// 14 | [DomName("code")] 15 | MediaErrorCode Code { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Parser/Xml/Tokens/XmlEndOfFileToken.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Parser.Xml 2 | { 3 | /// 4 | /// Represents the final token to mark the EOF. 5 | /// 6 | sealed class XmlEndOfFileToken : XmlToken 7 | { 8 | /// 9 | /// Creates a new EOF token. 10 | /// 11 | public XmlEndOfFileToken(TextPosition position) 12 | : base(XmlTokenType.EndOfFile, position) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlPlaintextElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The plaintext HTML element. 8 | /// 9 | sealed class HtmlPlaintextElement : HtmlElement 10 | { 11 | public HtmlPlaintextElement(Document owner, String prefix) 12 | : base(owner, TagNames.Plaintext, prefix, NodeFlags.Special | NodeFlags.LiteralText) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Mathml/MathOperatorElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Mathml 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The mo math element. 8 | /// 9 | sealed class MathOperatorElement : MathElement 10 | { 11 | public MathOperatorElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Mo, prefix, NodeFlags.Special | NodeFlags.MathTip | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Mathml/MathStringElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Mathml 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The math string element. 8 | /// 9 | sealed class MathStringElement : MathElement 10 | { 11 | public MathStringElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Ms, prefix, NodeFlags.MathTip | NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IDomException.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Defines how a DOMException should look like. 8 | /// 9 | [DomName("DOMException")] 10 | public interface IDomException 11 | { 12 | /// 13 | /// Gets the error code for this exception. 14 | /// 15 | [DomName("code")] 16 | Int32 Code { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Blazor.Host/Host/Debugging/Models/SourceFileInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Blazor.Host.Debugging.Models 4 | { 5 | public class SourceFileInfo 6 | { 7 | public string Id { get; set; } 8 | public string AssemblyName { get; set; } 9 | public string FileName { get; set; } 10 | public string Url { get; set; } 11 | public IDictionary> PossibleBreakpointLocationsByLine { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlNoEmbedElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents a noembed HTML element. 8 | /// 9 | sealed class HtmlNoEmbedElement : HtmlElement 10 | { 11 | public HtmlNoEmbedElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.NoEmbed, prefix, NodeFlags.Special | NodeFlags.LiteralText) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlPreElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML pre element. 8 | /// 9 | sealed class HtmlPreElement : HtmlElement, IHtmlPreElement 10 | { 11 | public HtmlPreElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Pre, prefix, NodeFlags.Special | NodeFlags.LineTolerance) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlSemanticElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents an HTML element with only semantic meaning. 8 | /// 9 | sealed class HtmlSemanticElement : HtmlElement 10 | { 11 | public HtmlSemanticElement(Document owner, String name, String prefix = null) 12 | : base(owner, name, prefix, NodeFlags.Special) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Mathml/MathIdentifierElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Mathml 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The mi math element. 8 | /// 9 | sealed class MathIdentifierElement : MathElement 10 | { 11 | public MathIdentifierElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Mi, prefix, NodeFlags.Special | NodeFlags.MathTip | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/FontVariant.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration with font variant transformations. 5 | /// 6 | public enum FontVariant : byte 7 | { 8 | /// 9 | /// Specifies a normal font face. 10 | /// 11 | Normal, 12 | /// 13 | /// Specifies a font that is labeled as a small-caps font. 14 | /// 15 | SmallCaps 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlNoFramesElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents a noframes HTML element. 8 | /// 9 | sealed class HtmlNoFramesElement : HtmlElement 10 | { 11 | public HtmlNoFramesElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.NoFrames, prefix, NodeFlags.Special | NodeFlags.LiteralText) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlNoScriptElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents a noscript HTML element. 8 | /// 9 | sealed class HtmlNoScriptElement : HtmlElement 10 | { 11 | public HtmlNoScriptElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.NoScript, prefix, NodeFlags.Special | NodeFlags.LiteralText) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Html/IFormSubmitter.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html 2 | { 3 | using System.IO; 4 | 5 | /// 6 | /// Strategy for serializing form data sets. 7 | /// 8 | public interface IFormSubmitter : IFormDataSetVisitor 9 | { 10 | /// 11 | /// Serializes the visited form data set to the stream. 12 | /// 13 | /// The stream writer to use. 14 | void Serialize(StreamWriter stream); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/IConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | /// 7 | /// Represents the interface for a general setup of AngleSharp 8 | /// or a particular AngleSharp request. 9 | /// 10 | public interface IConfiguration 11 | { 12 | /// 13 | /// Gets an enumeration over the available services. 14 | /// 15 | IEnumerable Services { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/IConditionFunction.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using System; 4 | 5 | /// 6 | /// Represents a function of the @supports rule. 7 | /// 8 | public interface IConditionFunction : ICssNode 9 | { 10 | /// 11 | /// Evaluates the condition and returns the result. 12 | /// 13 | /// True if the condition is supported, else false. 14 | Boolean Check(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Blazor.Host/Host/Debugging/Models/PossibleBreakpointLocation.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection.Metadata; 2 | 3 | namespace Blazor.Host.Debugging.Models 4 | { 5 | public class PossibleBreakpointLocation 6 | { 7 | public SourceFileInfo SourceFile { get; set; } 8 | public string DnaMethodIdentifier { get; set; } 9 | public int SequencePointIndex { get; set; } 10 | public SequencePoint SequencePointInfo { get; set; } 11 | public string MethodName { get; internal set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/BitConverter.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Runtime.CompilerServices; 4 | namespace System { 5 | public static class BitConverter { 6 | 7 | public static readonly bool IsLittleEndian = AmILittleEndian(); 8 | 9 | private unsafe static bool AmILittleEndian() { 10 | int i = 1; 11 | byte b = *((byte*)&i); 12 | return (b == 1); 13 | } 14 | 15 | public unsafe static long DoubleToInt64Bits(double value) { 16 | return *((long*)&value); 17 | } 18 | 19 | } 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlBreakRowElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML br element. 8 | /// 9 | sealed class HtmlBreakRowElement : HtmlElement, IHtmlBreakRowElement 10 | { 11 | public HtmlBreakRowElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Br, prefix, NodeFlags.Special | NodeFlags.SelfClosing) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlTableDataCellElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the object for HTML td elements. 8 | /// 9 | sealed class HtmlTableDataCellElement : HtmlTableCellElement, IHtmlTableDataCellElement 10 | { 11 | public HtmlTableDataCellElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Td, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Mathml/MathAnnotationXmlElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Mathml 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// The annotation-xml math element. 8 | /// 9 | sealed class MathAnnotationXmlElement : MathElement 10 | { 11 | public MathAnnotationXmlElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.AnnotationXml, prefix, NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlLegendElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the legend HTML element. 7 | /// 8 | [DomName("HTMLLegendElement")] 9 | public interface IHtmlLegendElement : IHtmlElement 10 | { 11 | /// 12 | /// Gets the associated form element, if any. 13 | /// 14 | [DomName("form")] 15 | IHtmlFormElement Form { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTimeElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the time HTML element. 8 | /// 9 | [DomName("HTMLTimeElement")] 10 | public interface IHtmlTimeElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the time. 14 | /// 15 | [DomName("datetime")] 16 | String DateTime { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/ILabelabelElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// This interface marks elements that allow to have an attached label. 7 | /// 8 | [DomNoInterfaceObject] 9 | public interface ILabelabelElement 10 | { 11 | /// 12 | /// Gets the list of assigned labels. 13 | /// 14 | [DomName("labels")] 15 | INodeList Labels { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Blazor.Host/Host/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | using System.IO; 4 | 5 | namespace Blazor.Sdk.Host 6 | { 7 | class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | BuildWebHost(args).Run(); 12 | } 13 | 14 | public static IWebHost BuildWebHost(string[] args) => 15 | WebHost.CreateDefaultBuilder(args) 16 | .UseStartup() 17 | .Build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Attributes/DomNoInterfaceObjectAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Attributes 2 | { 3 | using System; 4 | 5 | /// 6 | /// This attribute appears on an interfaces, which must not be available 7 | /// in the ECMAScript binding. 8 | /// 9 | [AttributeUsage( 10 | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, 11 | Inherited = false)] 12 | public sealed class DomNoInterfaceObjectAttribute : Attribute 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/StrokeLinejoin.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration containing the various predefined stroke linecaps. 5 | /// 6 | public enum StrokeLinejoin : byte 7 | { 8 | /// 9 | /// Stroke corners are standard 10 | /// 11 | Miter, 12 | /// 13 | /// Stroke corners are rounded 14 | /// 15 | Round, 16 | /// 17 | /// Stroke corners are bevelled 18 | /// 19 | Bevel 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlTableHeaderCellElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the object for HTML th elements. 8 | /// 9 | sealed class HtmlTableHeaderCellElement : HtmlTableCellElement, IHtmlTableHeaderCellElement 10 | { 11 | public HtmlTableHeaderCellElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Th, prefix) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/ILoadableElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | using AngleSharp.Network; 5 | 6 | /// 7 | /// The interface implemented by elements that may load resources. 8 | /// 9 | [DomNoInterfaceObject] 10 | public interface ILoadableElement 11 | { 12 | /// 13 | /// Gets the current download or resource, if any. 14 | /// 15 | IDownload CurrentDownload { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Foundation/WeakReference.cs: -------------------------------------------------------------------------------- 1 | #if NET40 || SL50 2 | namespace AngleSharp 3 | { 4 | using System; 5 | 6 | sealed class WeakReference 7 | where T : class 8 | { 9 | WeakReference wr; 10 | 11 | public WeakReference(T value) 12 | { 13 | wr = new WeakReference(value); 14 | } 15 | 16 | public Boolean TryGetTarget(out T value) 17 | { 18 | value = wr.Target as T; 19 | return value != null; 20 | } 21 | } 22 | } 23 | #endif -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssCharsetRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents a @charset CSS rule. 8 | /// 9 | [DomName("CSSCharsetRule")] 10 | public interface ICssCharsetRule : ICssRule 11 | { 12 | /// 13 | /// Gets or sets the character set to use. 14 | /// 15 | [DomName("encoding")] 16 | String CharacterSet { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTitleElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the title HTML element. 8 | /// 9 | [DomName("HTMLTitleElement")] 10 | public interface IHtmlTitleElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the text of the title. 14 | /// 15 | [DomName("text")] 16 | String Text { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Blazor.Host/Host/Debugging/Models/DebuggerInvocationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json.Linq; 3 | 4 | namespace Blazor.Host.Debugging.Models 5 | { 6 | public class DebuggerInvocationException : Exception 7 | { 8 | public JObject ErrorInfo { get; } 9 | 10 | public DebuggerInvocationException(JObject error) 11 | : base($"The invocation returned an error. See {nameof(ErrorInfo)} property for details.") 12 | { 13 | ErrorInfo = error; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/ClientServerApp.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netcoreapp1.0 4 | exe 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/AttrChangedCallback.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using System; 4 | 5 | /// 6 | /// Defines the callback signature to react once an attribute changes. 7 | /// 8 | /// The element hosting the attribute. 9 | /// The name of the changed attribute. 10 | /// The new value of the attribute. 11 | internal delegate void AttrChangedCallback(IElement element, String name, String value); 12 | } 13 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Svg/SvgDescElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// Represents the desc element of the SVG DOM. 8 | /// 9 | sealed class SvgDescElement : SvgElement, ISvgDescriptionElement 10 | { 11 | public SvgDescElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Desc, prefix, NodeFlags.HtmlTip | NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Svg/SvgTitleElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using System; 4 | using AngleSharp.Html; 5 | 6 | /// 7 | /// Represents the title element of the SVG DOM. 8 | /// 9 | sealed class SvgTitleElement : SvgElement, ISvgTitleElement 10 | { 11 | public SvgTitleElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Title, prefix, NodeFlags.HtmlTip | NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Extensions/ContextExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Extensions 2 | { 3 | using AngleSharp.Services; 4 | 5 | /// 6 | /// Useful methods for browsing contexts. 7 | /// 8 | static class ContextExtensions 9 | { 10 | public static TService CreateService(this IBrowsingContext context) 11 | { 12 | var factory = context.Configuration.GetFactory(); 13 | return factory.Create(context); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlDataElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the data HTML element. 8 | /// 9 | [DomName("HTMLDataElement")] 10 | public interface IHtmlDataElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the machine readable value. 14 | /// 15 | [DomName("value")] 16 | String Value { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlQuoteElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the q HTML element. 8 | /// 9 | [DomName("HTMLQuoteElement")] 10 | public interface IHtmlQuoteElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the citation of the element. 14 | /// 15 | [DomName("cite")] 16 | String Citation { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTemplateElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the template HTML element. 7 | /// 8 | [DomName("HTMLTemplateElement")] 9 | public interface IHtmlTemplateElement : IHtmlElement 10 | { 11 | /// 12 | /// Gets the template's content for cloning. 13 | /// 14 | [DomName("content")] 15 | IDocumentFragment Content { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlDataListElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents the datalist HTML element. 7 | /// 8 | [DomName("HTMLDataListElement")] 9 | public interface IHtmlDataListElement : IHtmlElement 10 | { 11 | /// 12 | /// Gets the associated options. 13 | /// 14 | [DomName("options")] 15 | IHtmlCollection Options { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlListItemElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the li HTML element. 8 | /// 9 | [DomName("HTMLLIElement")] 10 | public interface IHtmlListItemElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the value in an ordered list. 14 | /// 15 | [DomName("value")] 16 | Int32? Value { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/DNA/native/src/System.Attribute.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_ATTRIBUTE_H) 2 | #define __SYSTEM_ATTRIBUTE_H 3 | 4 | typedef struct tSystemAttribute_ tSystemAttribute; 5 | struct tSystemAttribute_ { 6 | int fake; 7 | }; 8 | 9 | typedef struct tInternalCustomAttributeInfo_ tInternalCustomAttributeInfo; 10 | struct tInternalCustomAttributeInfo_ { 11 | // Keep in sync with InternalCustomAttributeInfo struct in corlib C# code 12 | HEAP_PTR pUninitializedInstance; 13 | HEAP_PTR pConstructorMethodBase; 14 | HEAP_PTR pConstructorParams; 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Server/Program.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace ClientServerApp.Server 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | var host = new WebHostBuilder() 11 | .UseKestrel() 12 | .UseContentRoot(Directory.GetCurrentDirectory()) 13 | .UseStartup() 14 | .Build(); 15 | 16 | host.Run(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssMediaRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Represents a @media CSS rule. 7 | /// 8 | [DomName("CSSMediaRule")] 9 | public interface ICssMediaRule : ICssConditionRule 10 | { 11 | /// 12 | /// Gets a list of media types for this rule. 13 | /// 14 | [DomName("media")] 15 | [DomPutForwards("mediaText")] 16 | IMediaList Media { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlDetailsElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the details HTML element. 8 | /// 9 | [DomName("HTMLDetailsElement")] 10 | public interface IHtmlDetailsElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets if the element is opened. 14 | /// 15 | [DomName("open")] 16 | Boolean IsOpen { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Svg/ISvgDocument.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Serves as an entry point to the content of an SVG document. 7 | /// 8 | [DomName("SVGDocument")] 9 | public interface ISvgDocument : IDocument 10 | { 11 | /// 12 | /// Gets the root svg element in the document hierachy. 13 | /// 14 | [DomName("rootElement")] 15 | ISvgSvgElement RootElement { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssDocumentRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System.Collections.Generic; 5 | 6 | /// 7 | /// Represents a document CSS rule. 8 | /// 9 | [DomName("CSSDocumentRule")] 10 | public interface ICssDocumentRule : ICssConditionRule 11 | { 12 | /// 13 | /// Gets the functions to evaluate as conditions. 14 | /// 15 | IEnumerable Conditions { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlHtmlElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the html HTML element. 8 | /// 9 | [DomName("HTMLHtmlElement")] 10 | public interface IHtmlHtmlElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the value of the manifest attribute. 14 | /// 15 | [DomName("manifest")] 16 | String Manifest { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/Media/IImageInfo.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services.Media 2 | { 3 | using System; 4 | 5 | /// 6 | /// Contains information about an image file. 7 | /// 8 | public interface IImageInfo : IResourceInfo 9 | { 10 | /// 11 | /// Gets the width of the image. 12 | /// 13 | Int32 Width { get; } 14 | 15 | /// 16 | /// Gets the height of the image. 17 | /// 18 | Int32 Height { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/Media/IVideoInfo.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services.Media 2 | { 3 | using System; 4 | 5 | /// 6 | /// Contains information about a video file. 7 | /// 8 | public interface IVideoInfo : IMediaInfo 9 | { 10 | /// 11 | /// Gets the width of the video. 12 | /// 13 | Int32 Width { get; } 14 | 15 | /// 16 | /// Gets the height of the video. 17 | /// 18 | Int32 Height { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.Versioning 5 | { 6 | public sealed class TargetFrameworkAttribute : Attribute 7 | { 8 | public TargetFrameworkAttribute(string frameworkName) 9 | { 10 | FrameworkName = frameworkName; 11 | } 12 | public string FrameworkDisplayName { get; set; } 13 | public string FrameworkName { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/StrokeLinecap.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration containing the various predefined stroke linecaps. 5 | /// 6 | public enum StrokeLinecap : byte 7 | { 8 | /// 9 | /// Standard end of the open subpath 10 | /// 11 | Butt, 12 | /// 13 | /// End of the open subpaths is rounded 14 | /// 15 | Round, 16 | /// 17 | /// End of the open subpaths ends with a square 18 | /// 19 | Square 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlHeadingElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the an HTML heading element (h1, h2, h3, h4, h5, h6). 8 | /// 9 | sealed class HtmlHeadingElement : HtmlElement, IHtmlHeadingElement 10 | { 11 | public HtmlHeadingElement(Document owner, String name = null, String prefix = null) 12 | : base(owner, name ?? TagNames.H1, prefix, NodeFlags.Special) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssRuleCreator.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// Represents the possibility of creating rules. 5 | /// 6 | public interface ICssRuleCreator 7 | { 8 | /// 9 | /// Creates a new CSS rule and appends it to the current node. 10 | /// 11 | /// The type of rule to create. 12 | /// The created rule. 13 | ICssRule AddNewRule(CssRuleType ruleType); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Runtime.CompilerServices/AsyncServices.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | using System.Threading; 5 | 6 | namespace System.Runtime.CompilerServices 7 | { 8 | internal static class AsyncServices 9 | { 10 | internal static void ThrowAsync(Exception exception, object targetContext) 11 | { 12 | new Thread(() => 13 | { 14 | throw exception; 15 | }).Start(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlAppletElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | using AngleSharp.Attributes; 5 | using AngleSharp.Html; 6 | 7 | /// 8 | /// Represents the HTML applet element. 9 | /// 10 | [DomHistorical] 11 | sealed class HtmlAppletElement : HtmlElement 12 | { 13 | public HtmlAppletElement(Document owner, String prefix = null) 14 | : base(owner, TagNames.Applet, prefix, NodeFlags.Special | NodeFlags.Scoped) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlUnorderedListElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// The DOM Object representing the unordered list. 8 | /// 9 | sealed class HtmlUnorderedListElement : HtmlElement, IHtmlUnorderedListElement 10 | { 11 | public HtmlUnorderedListElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.Ul, prefix, NodeFlags.Special | NodeFlags.HtmlListScoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Attributes/DomLenientThisAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Attributes 2 | { 3 | using System; 4 | 5 | /// 6 | /// The attribute indicates that invocations of the attribute's getter 7 | /// or setter with a this value that is not an object that implements 8 | /// the interface on which the attribute appears will be ignored. 9 | /// 10 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Event, Inherited = false)] 11 | public sealed class DomLenientThisAttribute : Attribute 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/Media/IObjectInfo.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services.Media 2 | { 3 | using System; 4 | 5 | /// 6 | /// Contains information about a general object file. 7 | /// 8 | public interface IObjectInfo : IResourceInfo 9 | { 10 | /// 11 | /// Gets the width of the object. 12 | /// 13 | Int32 Width { get; } 14 | 15 | /// 16 | /// Gets the height of the object. 17 | /// 18 | Int32 Height { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Blazor.Host/Host/Debugging/Discovery/DebuggablePageInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.Host.Debugging.Discovery 2 | { 3 | public class DebuggablePageInfo 4 | { 5 | public string Description { get; set; } 6 | public string DevToolsFrontendUrl { get; set; } 7 | public string FaviconUrl { get; set; } 8 | public string Id { get; set; } 9 | public string Title { get; set; } 10 | public string Type { get; set; } 11 | public string Url { get; set; } 12 | public string WebSocketDebuggerUrl { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlBgsoundElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | using AngleSharp.Attributes; 5 | using AngleSharp.Html; 6 | 7 | /// 8 | /// Represents the HTML bgsound element. 9 | /// 10 | [DomHistorical] 11 | sealed class HtmlBgsoundElement : HtmlElement 12 | { 13 | public HtmlBgsoundElement(Document owner, String prefix = null) 14 | : base(owner, TagNames.Bgsound, prefix, NodeFlags.Special | NodeFlags.SelfClosing) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/VirtualDom/VEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Blazor.VirtualDom 4 | { 5 | public delegate void VEventHandler(EventInfo evt); 6 | public delegate Task VEventAsyncHandler(EventInfo evt); 7 | 8 | public struct EventInfo 9 | { 10 | public string EventType { get; } 11 | public object TargetValue { get; } 12 | 13 | public EventInfo(string eventType, object targetValue) 14 | { 15 | EventType = eventType; 16 | TargetValue = targetValue; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/DNA/corlib/System/Func.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System 6 | { 7 | public delegate TRes Func(); 8 | public delegate TRes Func(T1 arg1); 9 | public delegate TRes Func(T1 arg1, T2 arg2); 10 | public delegate TRes Func(T1 arg1, T2 arg2, T3 arg3); 11 | public delegate TRes Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4); 12 | public delegate TRes Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); 13 | } 14 | -------------------------------------------------------------------------------- /template/MyApplication/_preprocess.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTableHeaderCellElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the th HTML element. 8 | /// 9 | [DomName("HTMLTableHeaderCellElement")] 10 | public interface IHtmlTableHeaderCellElement : IHtmlTableCellElement 11 | { 12 | /// 13 | /// Gets or sets the scope of the th element. 14 | /// 15 | [DomName("scope")] 16 | String Scope { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Navigator/INavigatorOnline.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Navigator 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Connectivity information regarding the navigator. 8 | /// 9 | [DomName("NavigatorOnLine")] 10 | [DomNoInterfaceObject] 11 | public interface INavigatorOnline 12 | { 13 | /// 14 | /// Gets if the connection is established. 15 | /// 16 | [DomName("onLine")] 17 | Boolean IsOnline { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Svg/SvgForeignObjectElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Svg 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the foreign object element of the SVG DOM. 8 | /// 9 | sealed class SvgForeignObjectElement : SvgElement, ISvgForeignObjectElement 10 | { 11 | public SvgForeignObjectElement(Document owner, String prefix = null) 12 | : base(owner, TagNames.ForeignObject, prefix, NodeFlags.HtmlTip | NodeFlags.Special | NodeFlags.Scoped) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlTableColumnElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the col HTML element. 8 | /// 9 | [DomName("HTMLTableColElement")] 10 | public interface IHtmlTableColumnElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the number of columns in a group or affected by a grouping. 14 | /// 15 | [DomName("span")] 16 | Int32 Span { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/ILinkImport.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Implemented by elements that may expose imports. 7 | /// 8 | [DomName("LinkImport")] 9 | [DomNoInterfaceObject] 10 | public interface ILinkImport 11 | { 12 | /// 13 | /// Gets the Document object associated with the given element, or null 14 | /// if there is none. 15 | /// 16 | [DomName("import")] 17 | IDocument Import { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/ILinkStyle.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Implemented by elements that may expose stylesheets. 7 | /// 8 | [DomName("LinkStyle")] 9 | [DomNoInterfaceObject] 10 | public interface ILinkStyle 11 | { 12 | /// 13 | /// Gets the StyleSheet object associated with the given element, or 14 | /// null if there is none. 15 | /// 16 | [DomName("sheet")] 17 | IStyleSheet Sheet { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/IDownload.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | using AngleSharp.Dom; 4 | 5 | /// 6 | /// Basic contract for a currently active download. 7 | /// 8 | public interface IDownload : ICancellable 9 | { 10 | /// 11 | /// Gets the target of the download. 12 | /// 13 | Url Target { get; } 14 | 15 | /// 16 | /// Gets the originator of the download, if any. 17 | /// 18 | INode Originator { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IEntityProvider.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using System; 4 | 5 | /// 6 | /// Defines methods to create a custom entity service. 7 | /// 8 | public interface IEntityProvider 9 | { 10 | /// 11 | /// Gets a symbol specified by its entity name. 12 | /// 13 | /// The name of the entity in the markup. 14 | /// The string with the symbol or null. 15 | String GetSymbol(String name); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/OverflowWrap.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration with all possible Overflow Wrap options. 5 | /// 6 | public enum OverflowWrap : byte 7 | { 8 | /// 9 | /// Indicates that lines may only break at normal word break points. 10 | /// 11 | Normal, 12 | /// 13 | /// Indicates that normally unbreakable words may be broken at arbitrary points 14 | /// if there are no otherwise acceptable break points in the line. 15 | /// 16 | BreakWord 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlFontElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using AngleSharp.Html; 5 | using System; 6 | 7 | /// 8 | /// Represents a font element. 9 | /// See (19) obsolete features of [WHATWG]. 10 | /// 11 | [DomHistorical] 12 | sealed class HtmlFontElement : HtmlElement 13 | { 14 | public HtmlFontElement(Document owner, String prefix = null) 15 | : base(owner, TagNames.Font, prefix, NodeFlags.HtmlFormatting) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/ICommandProvider.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Commands; 4 | using System; 5 | 6 | /// 7 | /// Represents a provider to get document commands. 8 | /// 9 | public interface ICommandProvider 10 | { 11 | /// 12 | /// Gets the command with the given id. 13 | /// 14 | /// The id of the command. 15 | /// The document command if any. 16 | ICommand GetCommand(String name); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/ListPosition.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration over all list positions. 5 | /// 6 | public enum ListPosition : byte 7 | { 8 | /// 9 | /// The marker box is the first inline box in the principal 10 | /// block box, after which the element's content flows. 11 | /// 12 | Inside, 13 | /// 14 | /// The marker box is outside the principal block box. 15 | /// 16 | Outside 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/ISettableTokenList.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// The same as TokenList, except that it allows the underlying string to 8 | /// be directly changed. 9 | /// 10 | [DomName("DOMSettableTokenList")] 11 | public interface ISettableTokenList : ITokenList 12 | { 13 | /// 14 | /// Gets or sets the underlying string. 15 | /// 16 | [DomName("value")] 17 | String Value { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/FileAttributes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileAttributes { 5 | Archive = 0x00020, 6 | Compressed = 0x00800, 7 | Device = 0x00040, // Reserved for future use (NOT the w32 value). 8 | Directory = 0x00010, 9 | Encrypted = 0x04000, // NOT the w32 value 10 | Hidden = 0x00002, 11 | Normal = 0x00080, 12 | NotContentIndexed = 0x02000, 13 | Offline = 0x01000, 14 | ReadOnly = 0x00001, 15 | ReparsePoint = 0x00400, 16 | SparseFile = 0x00200, 17 | System = 0x00004, 18 | Temporary = 0x00100 19 | } 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Loading...
10 | 11 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/AngleSharp/IMarkupFormattable.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp 2 | { 3 | using System.IO; 4 | 5 | /// 6 | /// Allows basic serialization. 7 | /// 8 | public interface IMarkupFormattable 9 | { 10 | /// 11 | /// Writes the serialization of the node guided by the formatter. 12 | /// 13 | /// The output target of the serialization. 14 | /// The formatter to use. 15 | void ToHtml(TextWriter writer, IMarkupFormatter formatter); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/IStyleFormattable.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp 2 | { 3 | using System.IO; 4 | 5 | /// 6 | /// Allows basic serialization. 7 | /// 8 | public interface IStyleFormattable 9 | { 10 | /// 11 | /// Writes the serialization of the node guided by the formatter. 12 | /// 13 | /// The output target of the serialization. 14 | /// The formatter to use. 15 | void ToCss(TextWriter writer, IStyleFormatter formatter); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssNode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// Represents a node in the CSSOM. 7 | /// 8 | public interface ICssNode : IStyleFormattable 9 | { 10 | /// 11 | /// Gets the children of this node. 12 | /// 13 | IEnumerable Children { get; } 14 | 15 | /// 16 | /// Gets the original source code, if any. 17 | /// 18 | TextView SourceCode { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IEventFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Events; 4 | using System; 5 | 6 | /// 7 | /// Represents a factory to create event data. 8 | /// 9 | public interface IEventFactory 10 | { 11 | /// 12 | /// Creates a new event data object for the given event. 13 | /// 14 | /// The name of the event. 15 | /// The event data for the given event. 16 | Event Create(String name); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.ComponentModel.DataAnnotations 6 | { 7 | public class StringLengthAttribute : ValidationAttribute 8 | { 9 | private readonly int _maximumLength; 10 | 11 | public StringLengthAttribute(int maximumLength) 12 | { 13 | _maximumLength = maximumLength; 14 | } 15 | 16 | public int MinimumLength => 0; 17 | public int MaximumLength => _maximumLength; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/ContentEditableMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// An enumeration with all contenteditable modes. 5 | /// 6 | enum ContentEditableMode : byte 7 | { 8 | /// 9 | /// Not contenteditable. 10 | /// 11 | False, 12 | /// 13 | /// The element is contenteditable. 14 | /// 15 | True, 16 | /// 17 | /// Inherited from the parent element. 18 | /// 19 | Inherited 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlDirectoryElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using AngleSharp.Html; 5 | using System; 6 | 7 | /// 8 | /// Represents the HTML dir element. 9 | /// This element is obsolete since HTML 4.01. 10 | /// 11 | [DomHistorical] 12 | sealed class HtmlDirectoryElement : HtmlElement 13 | { 14 | public HtmlDirectoryElement(Document owner, String prefix = null) 15 | : base (owner, TagNames.Dir, prefix, NodeFlags.Special) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlBaseFontElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using System; 4 | using AngleSharp.Attributes; 5 | using AngleSharp.Html; 6 | 7 | /// 8 | /// Represents an HTML basefont element. 9 | /// Deprecated in HTML 4.01. 10 | /// 11 | [DomHistorical] 12 | sealed class HtmlBaseFontElement : HtmlElement 13 | { 14 | public HtmlBaseFontElement(Document owner, String prefix = null) 15 | : base(owner, TagNames.BaseFont, prefix, NodeFlags.Special | NodeFlags.SelfClosing) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.ComponentModel.DataAnnotations/DisplayNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.ComponentModel 6 | { 7 | public class DisplayNameAttribute : Attribute 8 | { 9 | private readonly string _displayName; 10 | 11 | public DisplayNameAttribute() : this(null) 12 | { 13 | } 14 | 15 | public DisplayNameAttribute(string displayName) 16 | { 17 | _displayName = displayName; 18 | } 19 | 20 | public string DisplayName => _displayName; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/File.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public static class File { 5 | 6 | public static FileStream OpenRead(string path) { 7 | return new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); 8 | } 9 | 10 | public static StreamReader OpenText(string path) { 11 | return new StreamReader(path); 12 | } 13 | 14 | public static bool Exists(string path) { 15 | if (string.IsNullOrEmpty(path)) { 16 | return false; 17 | } 18 | int error; 19 | return FileInternal.ExistsFile(path, out error); 20 | } 21 | 22 | } 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/DocumentReadyState.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// Defines the document readiness. 5 | /// 6 | public enum DocumentReadyState : byte 7 | { 8 | /// 9 | /// The document is still loading. 10 | /// 11 | Loading, 12 | /// 13 | /// The document is interactive, i.e. interaction possible. 14 | /// 15 | Interactive, 16 | /// 17 | /// Loading is complete. 18 | /// 19 | Complete 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Css/Values/IGradient.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css.Values 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | /// 7 | /// The common interface for all CSS gradients. 8 | /// 9 | public interface IGradient : IImageSource 10 | { 11 | /// 12 | /// Gets an enumeration of all stops. 13 | /// 14 | IEnumerable Stops { get; } 15 | 16 | /// 17 | /// Gets if the gradient is repeating. 18 | /// 19 | Boolean IsRepeating { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Navigator/INavigatorStorageUtilities.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Navigator 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Defines a set of methods for working with IO. 7 | /// 8 | [DomName("NavigatorStorageUtils")] 9 | [DomNoInterfaceObject] 10 | public interface INavigatorStorageUtilities 11 | { 12 | /// 13 | /// Blocks the current operation until storage operations have completed. 14 | /// 15 | [DomName("yieldForStorageUpdates")] 16 | void WaitForStorageUpdates(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/PointerAccuracy.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// Values for the accuracy of a pointer device. 5 | /// 6 | public enum PointerAccuracy : byte 7 | { 8 | /// 9 | /// Not actually a pointing device. 10 | /// 11 | None, 12 | /// 13 | /// Defines a pointing device of limited accuracy. 14 | /// 15 | Coarse, 16 | /// 17 | /// Defines an accurate pointing device. 18 | /// 19 | Fine 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/IDocumentLoader.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | /// 4 | /// Interface used to handle top-level document requests. These requests 5 | /// include navigation tasks. 6 | /// 7 | public interface IDocumentLoader : ILoader 8 | { 9 | /// 10 | /// Performs an asynchronous request that can be cancelled. 11 | /// 12 | /// The options to consider. 13 | /// The download instance to track. 14 | IDownload DownloadAsync(DocumentRequest request); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IPseudoClassSelectorFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Css; 4 | using System; 5 | 6 | /// 7 | /// Represents a factory for pseudo-class selectors. 8 | /// 9 | public interface IPseudoClassSelectorFactory 10 | { 11 | /// 12 | /// Creates a new pseudo-class selector for the given name. 13 | /// 14 | /// The name of the pseudo-class. 15 | /// The created selector, if any. 16 | ISelector Create(String name); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlWbrElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Html; 4 | using System; 5 | 6 | /// 7 | /// Represents the HTML wbr (word-break-opportunity) element. 8 | /// This element is used to indicate that the position is a good 9 | /// point for inserting a possible line-break. 10 | /// 11 | sealed class HtmlWbrElement : HtmlElement 12 | { 13 | public HtmlWbrElement(Document owner, String prefix = null) 14 | : base(owner, TagNames.Wbr, prefix, NodeFlags.Special | NodeFlags.SelfClosing) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IStylingProvider.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Services.Styling; 4 | using System; 5 | 6 | /// 7 | /// Defines the methods to access available style engines. 8 | /// 9 | public interface IStylingProvider 10 | { 11 | /// 12 | /// Gets the registered engine for the provided mime-type. 13 | /// 14 | /// The type of the engine. 15 | /// The engine for the mime-type, if any. 16 | IStyleEngine GetEngine(String mimeType); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/Browser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Text; 5 | 6 | namespace Blazor.Interop 7 | { 8 | public static class Browser 9 | { 10 | [DllImport(@"browser.js", CharSet = CharSet.Ansi)] 11 | public static extern int JSEval(string code); 12 | 13 | [DllImport(@"browser.js", CharSet = CharSet.Ansi)] 14 | public static extern void Alert(string message); 15 | 16 | [DllImport(@"browser.js", CharSet = CharSet.Ansi)] 17 | public static extern string ResolveRelativeUrl(string url); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IPseudoElementSelectorFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Css; 4 | using System; 5 | 6 | /// 7 | /// Represents a factory for pseudo-element selectors. 8 | /// 9 | public interface IPseudoElementSelectorFactory 10 | { 11 | /// 12 | /// Creates a new pseudo-element selector for the given name. 13 | /// 14 | /// The name of the pseudo-element. 15 | /// The created selector, if any. 16 | ISelector Create(String name); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/JavaScript.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.Runtime.Interop 2 | { 3 | public class JavaScript 4 | { 5 | private static readonly JSObjectHandle _windowHandle = (JSObjectHandle)JSObjectHandle.Global.GetProperty("window"); 6 | private static readonly JSObjectHandle _documentHandle = (JSObjectHandle)_windowHandle.GetProperty("document"); 7 | 8 | public static Window Window => new Window(_windowHandle); 9 | 10 | public static Document Document => new Document(_documentHandle); 11 | 12 | public static JavaScriptInvocation Global => new JavaScriptInvocation(JSObjectHandle.Global); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/DNA/corlib/corlib.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Library 5 | netstandard1.3 6 | corlib 7 | corlib 8 | true 9 | false 10 | true 11 | 0 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/WordBreak.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// The list of possible horizontal alignments. 5 | /// 6 | public enum WordBreak : byte 7 | { 8 | /// 9 | /// Use the default line break rule. 10 | /// 11 | Normal, 12 | /// 13 | /// Word breaks may be inserted between any 14 | /// character for non-CJK (Chinese/Japanese/Korean) text. 15 | /// 16 | BreakAll, 17 | /// 18 | /// Don't allow word breaks for CJK text. 19 | /// Non-CJK text behavior is the same as for normal. 20 | /// 21 | KeepAll 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IScriptingProvider.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Services.Scripting; 4 | using System; 5 | 6 | /// 7 | /// Defines the methods to access available script engines. 8 | /// 9 | public interface IScriptingProvider 10 | { 11 | /// 12 | /// Gets the registered engine for the provided mime-type. 13 | /// 14 | /// The type of the engine. 15 | /// The engine for the mime-type, if any. 16 | IScriptEngine GetEngine(String mimeType); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Attributes/DomHistoricalAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Attributes 2 | { 3 | using System; 4 | 5 | /// 6 | /// This attribute decorates official DOM objects that should no longer be 7 | /// used and are therefore considered deprecated. 8 | /// 9 | [AttributeUsage( 10 | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | 11 | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Method | 12 | AttributeTargets.Field | AttributeTargets.Delegate)] 13 | public sealed class DomHistoricalAttribute : Attribute 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/ShadowRootMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// List of possible shadow root mode states. 7 | /// 8 | [DomName("ShadowRootMode")] 9 | [DomLiterals] 10 | public enum ShadowRootMode : byte 11 | { 12 | /// 13 | /// Specifies open encapsulation mode. 14 | /// 15 | [DomName("open")] 16 | Open = 0, 17 | /// 18 | /// Specifies closed encapsulation mode. 19 | /// 20 | [DomName("closed")] 21 | Closed = 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IEncodingProvider.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using System; 4 | using System.Text; 5 | 6 | /// 7 | /// Represents a service to determine the default encoding. 8 | /// 9 | public interface IEncodingProvider 10 | { 11 | /// 12 | /// Suggests the initial Encoding for the given locale. 13 | /// 14 | /// 15 | /// The locale defined by the BCP 47 language tag. 16 | /// 17 | /// The suggested encoding. 18 | Encoding Suggest(String locale); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Net.Http/HttpContent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace System.Net.Http 5 | { 6 | public class HttpContent 7 | { 8 | protected IDictionary dictionary; 9 | 10 | public HttpContent(IDictionary dictionary) 11 | { 12 | this.dictionary = dictionary; 13 | } 14 | 15 | public Task ReadAsStringAsync() 16 | { 17 | var tcs = new TaskCompletionSource(); 18 | tcs.TrySetResult((string)dictionary["bodyText"]); 19 | return tcs.Task; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/DNA/corlib/System.Net.Http/StringContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Net.Http 6 | { 7 | public class StringContent : HttpContent 8 | { 9 | public StringContent(string content) 10 | : base(new Dictionary()) 11 | { 12 | dictionary["bodyText"] = content; 13 | dictionary["mediaType"] = "application/json"; 14 | } 15 | 16 | public string Content { get { return (string)dictionary["bodyText"]; } } 17 | 18 | public string MediaType { get { return (string)dictionary["mediaType"]; } } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/HoverAbility.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// Specifies a user's ability to hover over elements. 5 | /// 6 | public enum HoverAbility : byte 7 | { 8 | /// 9 | /// Elements cannot be hovered at all. 10 | /// 11 | None, 12 | /// 13 | /// Possible, but requires a significant action on the user's part. 14 | /// 15 | OnDemand, 16 | /// 17 | /// Hover over parts of the page is easily possible. 18 | /// 19 | Hover 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/HttpMethod.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | /// 4 | /// Represents the usable methods for transmitting HTTP forms. 5 | /// 6 | public enum HttpMethod : byte 7 | { 8 | /// 9 | /// The GET method. 10 | /// 11 | Get, 12 | /// 13 | /// The POST method. 14 | /// 15 | Post, 16 | /// 17 | /// The PUT method. 18 | /// 19 | Put, 20 | /// 21 | /// The DELETE method. 22 | /// 23 | Delete 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/QuirksMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// A list of possible quirks mode states. 7 | /// 8 | enum QuirksMode : byte 9 | { 10 | /// 11 | /// The quirks mode is deactivated. 12 | /// 13 | Off, 14 | /// 15 | /// The quirks mode is partly activated. 16 | /// 17 | Limited, 18 | /// 19 | /// The quirks mode is activated. 20 | /// 21 | [DomDescription("BackCompat")] 22 | On 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Rules/CssViewportRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | using AngleSharp.Parser.Css; 5 | using System; 6 | 7 | /// 8 | /// Represents the @viewport rule. 9 | /// 10 | sealed class CssViewportRule : CssDeclarationRule 11 | { 12 | internal CssViewportRule(CssParser parser) 13 | : base(CssRuleType.Viewport, RuleNames.ViewPort, parser) 14 | { 15 | } 16 | 17 | protected override CssProperty CreateNewProperty(String name) 18 | { 19 | return Factory.Properties.CreateViewport(name); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/AngleSharp/Html/InputTypes/SubmitInputType.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html.InputTypes 2 | { 3 | using AngleSharp.Dom.Html; 4 | using System; 5 | 6 | class SubmitInputType : BaseInputType 7 | { 8 | #region ctor 9 | 10 | public SubmitInputType(IHtmlInputElement input, String name) 11 | : base(input, name, validate: true) 12 | { 13 | } 14 | 15 | #endregion 16 | 17 | #region Methods 18 | 19 | public override Boolean IsAppendingData(IHtmlElement submitter) 20 | { 21 | return Object.ReferenceEquals(submitter, Input); 22 | } 23 | 24 | #endregion 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/IKeyframeSelector.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css.Values; 4 | using System; 5 | using System.Collections.Generic; 6 | 7 | /// 8 | /// Represents a CSS key text. 9 | /// 10 | public interface IKeyframeSelector : ICssNode 11 | { 12 | /// 13 | /// Gets an enumeration over all stops. 14 | /// 15 | IEnumerable Stops { get; } 16 | 17 | /// 18 | /// Gets the text representation of the keyframe selector. 19 | /// 20 | String Text { get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IServiceFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | /// 4 | /// Represents the factory to create arbitrary (third-party) services. 5 | /// 6 | public interface IServiceFactory 7 | { 8 | /// 9 | /// Creates a new service for the given context. 10 | /// 11 | /// The type of service. 12 | /// The context to host the service. 13 | /// The created service or a default instance. 14 | TService Create(IBrowsingContext context); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssConditionRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents all the "conditional" at-rules, which consist 8 | /// of a condition and a statement block. 9 | /// 10 | [DomName("CSSConditionRule")] 11 | [DomNoInterfaceObject] 12 | public interface ICssConditionRule : ICssGroupingRule 13 | { 14 | /// 15 | /// Gets or sets the text representation of the condition. 16 | /// 17 | [DomName("conditionText")] 18 | String ConditionText { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Server/ClientServerApp.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Properties/Text/CssTextJustifyProperty.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | 5 | sealed class CssTextJustifyProperty : CssProperty 6 | { 7 | #region Fields 8 | 9 | static readonly IValueConverter StyleConverter = Converters.TextJustifyConverter; 10 | 11 | #endregion 12 | 13 | #region ctor 14 | 15 | public CssTextJustifyProperty() 16 | : base(PropertyNames.TextJustify) 17 | { 18 | } 19 | 20 | #endregion 21 | 22 | #region Properties 23 | 24 | internal override IValueConverter Converter 25 | { 26 | get 27 | { 28 | return StyleConverter; 29 | } 30 | } 31 | 32 | #endregion 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.IO/FileInfo.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public sealed class FileInfo : FileSystemInfo { 5 | 6 | #pragma warning disable 0169 7 | private bool exists; 8 | #pragma warning restore 0169 9 | 10 | public FileInfo(string path) { 11 | CheckPath(path); 12 | 13 | base.originalPath = path; 14 | base.fullPath = Path.GetFullPath(path); 15 | } 16 | 17 | public override bool Exists { 18 | get { throw new Exception("The method or operation is not implemented."); } 19 | } 20 | 21 | public override string Name { 22 | get { 23 | return Path.GetFileName(base.fullPath); 24 | } 25 | } 26 | 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Collections/SettableTokenList.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Collections 2 | { 3 | using System; 4 | 5 | /// 6 | /// A list of tokens that can be modified. 7 | /// 8 | sealed class SettableTokenList : TokenList, ISettableTokenList 9 | { 10 | #region ctor 11 | 12 | internal SettableTokenList(String value) 13 | : base(value) 14 | { 15 | } 16 | 17 | #endregion 18 | 19 | #region Properties 20 | 21 | public String Value 22 | { 23 | get { return ToString(); } 24 | set { Update(value); } 25 | } 26 | 27 | #endregion 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/FontStyle.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// The enumeration with the various font styles. 5 | /// 6 | public enum FontStyle : byte 7 | { 8 | /// 9 | /// Selects a font that is classified as normal within a font-family. 10 | /// 11 | Normal, 12 | /// 13 | /// Selects a font that is labeled italic, if that is not available, one labeled oblique. 14 | /// 15 | Italic, 16 | /// 17 | /// Selects a font that is labeled oblique. 18 | /// 19 | Oblique 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Foundation/TaskPriority.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp 2 | { 3 | /// 4 | /// Describes the various task priorities. 5 | /// 6 | public enum TaskPriority : byte 7 | { 8 | /// 9 | /// The lowest possible priority. 10 | /// 11 | None, 12 | /// 13 | /// The normal priority. 14 | /// 15 | Normal, 16 | /// 17 | /// Microtasks are preferred. 18 | /// 19 | Microtask, 20 | /// 21 | /// Critical tasks are always executed asap. 22 | /// 23 | Critical 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/IElementCssInlineStyle.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Used to mark elements that may have inline style, 7 | /// usually set and defined over an attribute. 8 | /// 9 | [DomName("ElementCSSInlineStyle")] 10 | [DomNoInterfaceObject] 11 | public interface IElementCssInlineStyle 12 | { 13 | /// 14 | /// Gets an object representing the declarations of an element's style attributes. 15 | /// 16 | [DomName("style")] 17 | [DomPutForwards("cssText")] 18 | ICssStyleDeclaration Style { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/Document.cs: -------------------------------------------------------------------------------- 1 | namespace Blazor.Runtime.Interop 2 | { 3 | public class Document : JavaScriptInvocation 4 | { 5 | internal Document(JSObjectHandle currentHandle) : base(currentHandle) 6 | { 7 | } 8 | 9 | public Node GetElementById(string id) 10 | { 11 | var elem = this["getElementById"].Invoke(id); 12 | return elem == null ? null : new Node(elem); 13 | } 14 | 15 | public class Node : JSObject 16 | { 17 | public Node(JSObjectHandle handle) : base(handle) { } 18 | 19 | public string TagName => (string)GetProperty("tagName"); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /template/MyApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:59429/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "LAUNCHER_ARGS": "blazor serve", 16 | "LAUNCHER_PATH": "dotnet" 17 | } 18 | }, 19 | "MyApplication": { 20 | "commandName": "Executable", 21 | "executablePath": "dotnet", 22 | "commandLineArgs": "blazor serve" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Properties/CssUnknownProperty.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | using System; 5 | 6 | /// 7 | /// Represents an unknown property that takes every value. 8 | /// 9 | sealed class CssUnknownProperty : CssProperty 10 | { 11 | #region ctor 12 | 13 | internal CssUnknownProperty(String name) 14 | : base(name) 15 | { 16 | } 17 | 18 | #endregion 19 | 20 | #region Properties 21 | 22 | internal override IValueConverter Converter 23 | { 24 | get { return Converters.Any; } 25 | } 26 | 27 | #endregion 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlBaseElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the base HTML element. 8 | /// 9 | [DomName("HTMLBaseElement")] 10 | public interface IHtmlBaseElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the hyperreference to the base URL. 14 | /// 15 | [DomName("href")] 16 | String Href { get; set; } 17 | 18 | /// 19 | /// Gets or sets the base target. 20 | /// 21 | [DomName("Target")] 22 | String Target { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Io/IFile.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Io 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents a concrete file. 8 | /// http://dev.w3.org/2006/webapi/FileAPI/#dfn-file 9 | /// 10 | [DomName("File")] 11 | public interface IFile : IBlob 12 | { 13 | /// 14 | /// Gets the file's name. 15 | /// 16 | [DomName("name")] 17 | String Name { get; } 18 | 19 | /// 20 | /// Gets the last modified date of the file. 21 | /// 22 | [DomName("lastModified")] 23 | DateTime LastModified { get; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/Floating.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// All possible values for taking an element out of its normal flow. 5 | /// 6 | public enum Floating : byte 7 | { 8 | /// 9 | /// Indicates that the element must not float. 10 | /// 11 | None, 12 | /// 13 | /// Indicates that the element must float on the left side of its containing block. 14 | /// 15 | Left, 16 | /// 17 | /// Indicates that the element must float on the right side of its containing block. 18 | /// 19 | Right 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Properties/Font/CssSrcProperty.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | 5 | /// 6 | /// More information available at: 7 | /// https://developer.mozilla.org/en/docs/Web/CSS/@font-face 8 | /// 9 | sealed class CssSrcProperty : CssProperty 10 | { 11 | #region ctor 12 | 13 | public CssSrcProperty() 14 | : base(PropertyNames.Src) 15 | { 16 | } 17 | 18 | #endregion 19 | 20 | #region Properties 21 | 22 | internal override IValueConverter Converter 23 | { 24 | get { return Converters.Any; } 25 | } 26 | 27 | #endregion 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlParamElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the param HTML element. 8 | /// 9 | [DomName("HTMLParamElement")] 10 | public interface IHtmlParamElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the name of the parameter. 14 | /// 15 | [DomName("name")] 16 | String Name { get; set; } 17 | 18 | /// 19 | /// Gets or sets the value of the parameter. 20 | /// 21 | [DomName("value")] 22 | String Value { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Rules/CssConditionRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | using AngleSharp.Parser.Css; 5 | using System; 6 | 7 | /// 8 | /// Represents the abstract base class for CSS media and CSS supports rules. 9 | /// 10 | abstract class CssConditionRule : CssGroupingRule 11 | { 12 | #region ctor 13 | 14 | internal CssConditionRule (CssRuleType type, CssParser parser) 15 | : base(type, parser) 16 | { 17 | } 18 | 19 | #endregion 20 | 21 | #region Internal Methods 22 | 23 | internal abstract Boolean IsValid(RenderDevice device); 24 | 25 | #endregion 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlMenuElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the menu HTML element. 8 | /// 9 | [DomName("HTMLMenuElement")] 10 | public interface IHtmlMenuElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets the text label of the menu element. 14 | /// 15 | [DomName("label")] 16 | String Label { get; set; } 17 | 18 | /// 19 | /// Gets or sets the type of the menu element. 20 | /// 21 | [DomName("type")] 22 | String Type { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IBindable.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using System; 4 | 5 | /// 6 | /// Implemented by OM classes that may change internal state reflected with 7 | /// a changed string representation. 8 | /// 9 | public interface IBindable 10 | { 11 | /// 12 | /// Triggered when the internal state changed. 13 | /// 14 | event Action Changed; 15 | 16 | /// 17 | /// Update the string representation without calling Changed. 18 | /// 19 | /// The representation's new value. 20 | void Update(String value); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Reflection/MethodInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace System.Reflection 4 | { 5 | public abstract class MethodInfo : MethodBase 6 | { 7 | } 8 | 9 | public abstract class MethodBase : MemberInfo 10 | { 11 | #pragma warning disable 0169, 0649 12 | private readonly IntPtr _methodDef; 13 | #pragma warning restore 0169, 0649 14 | 15 | public object Invoke(object target, object[] parameters) 16 | { 17 | // This is not invoked at runtime, because the JITter specifically replaces calls 18 | // to MethodBase.Invoke with its own special opcode 19 | throw new NotImplementedException(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/RangePosition.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// An enumeration of possible values for position comparisons in a range object. 5 | /// 6 | public enum RangePosition : short 7 | { 8 | /// 9 | /// The position of the given point to the other point is before. 10 | /// 11 | Before = -1, 12 | /// 13 | /// The position of the given point to the other point is equal. 14 | /// 15 | Equal = 0, 16 | /// 17 | /// The position of the given point to the other point is after. 18 | /// 19 | After = 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Html/InputTypes/PatternInputType.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html.InputTypes 2 | { 3 | using AngleSharp.Dom.Html; 4 | using System; 5 | 6 | class PatternInputType : BaseInputType 7 | { 8 | #region ctor 9 | 10 | public PatternInputType(IHtmlInputElement input, String name) 11 | : base(input, name, validate: true) 12 | { 13 | } 14 | 15 | #endregion 16 | 17 | #region Methods 18 | 19 | public override void Check(ValidityState state) 20 | { 21 | var value = Input.Value ?? String.Empty; 22 | state.IsPatternMismatch = IsInvalidPattern(Input.Pattern, value); 23 | } 24 | 25 | #endregion 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/DocumentFunctions/UrlPrefixFunction.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | using System; 5 | 6 | /// 7 | /// Take an url prefix. 8 | /// 9 | sealed class UrlPrefixFunction : DocumentFunction 10 | { 11 | #region ctor 12 | 13 | public UrlPrefixFunction(String url) 14 | : base(FunctionNames.UrlPrefix, url) 15 | { 16 | } 17 | 18 | #endregion 19 | 20 | #region Methods 21 | 22 | public override Boolean Matches(Url url) 23 | { 24 | return url.Href.StartsWith(Data, StringComparison.OrdinalIgnoreCase); 25 | } 26 | 27 | #endregion 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/CorsSetting.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | /// 4 | /// CORS settings attributes (see 2.6.6). 5 | /// 6 | public enum CorsSetting : byte 7 | { 8 | /// 9 | /// The default (missing) value. 10 | /// 11 | None, 12 | /// 13 | /// Cross-origin CORS requests for the element will have the omit 14 | /// credentials flag set. 15 | /// 16 | Anonymous, 17 | /// 18 | /// Cross-origin CORS requests for the element will not have the omit 19 | /// credentials flag set 20 | /// 21 | UseCredentials 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/IIntegrityProvider.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using System; 4 | 5 | /// 6 | /// Defines the methods to perform an integrity check. 7 | /// 8 | public interface IIntegrityProvider 9 | { 10 | /// 11 | /// Checks if the given content satisfies the provided integrity 12 | /// attribute. 13 | /// 14 | /// The content to hash. 15 | /// The value of the integrity attribute. 16 | /// True if integrity is preserved, otherwise false. 17 | Boolean IsSatisfied(Byte[] content, String integrity); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Blazor.Host/Host/Debugging/Protocol/MessageBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json.Linq; 3 | using Newtonsoft.Json; 4 | using Newtonsoft.Json.Serialization; 5 | 6 | namespace Blazor.Host.Debugging.Protocol 7 | { 8 | public class MessageBase 9 | { 10 | public int? Id { get; set; } 11 | public string Method { get; set; } 12 | public JObject Params { get; set; } 13 | public JObject Result { get; set; } 14 | public JObject Error { get; set; } 15 | 16 | internal string ToDebugString() 17 | { 18 | return JsonConvert.SerializeObject(this, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Reflection/PropertyInfo.cs: -------------------------------------------------------------------------------- 1 | namespace System.Reflection 2 | { 3 | public abstract class PropertyInfo : MemberInfo 4 | { 5 | #pragma warning disable 0649 6 | private readonly Type _propertyType; 7 | #pragma warning restore 0649 8 | 9 | public Type PropertyType => _propertyType; 10 | 11 | public MethodInfo GetGetMethod() 12 | { 13 | return _ownerType.GetMethod("get_" + _name); 14 | } 15 | 16 | public MethodInfo GetSetMethod() 17 | { 18 | return _ownerType.GetMethod("set_" + _name); 19 | } 20 | 21 | public MethodInfo GetMethod => GetGetMethod(); 22 | public MethodInfo SetMethod => GetSetMethod(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AngleSharp/Html/InputTypes/ButtonInputType.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html.InputTypes 2 | { 3 | using AngleSharp.Dom.Html; 4 | using AngleSharp.Extensions; 5 | using System; 6 | 7 | class ButtonInputType : BaseInputType 8 | { 9 | #region ctor 10 | 11 | public ButtonInputType(IHtmlInputElement input, String name) 12 | : base(input, name, validate: false) 13 | { 14 | } 15 | 16 | #endregion 17 | 18 | #region Methods 19 | 20 | public override Boolean IsAppendingData(IHtmlElement submitter) 21 | { 22 | return !Name.Is(InputTypeNames.Reset) || Object.ReferenceEquals(submitter, Input); 23 | } 24 | 25 | #endregion 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Html/IHtmlOptionsGroupElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the optgroup HTML element. 8 | /// 9 | [DomName("HTMLOptGroupElement")] 10 | public interface IHtmlOptionsGroupElement : IHtmlElement 11 | { 12 | /// 13 | /// Gets or sets if the optgroup is enabled or disabled. 14 | /// 15 | [DomName("disabled")] 16 | Boolean IsDisabled { get; set; } 17 | 18 | /// 19 | /// Gets or sets the label. 20 | /// 21 | [DomName("label")] 22 | String Label { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/Counter.cshtml: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of a component.

4 | 5 |

6 | Current count: @currentCount   7 | 8 |

9 | 10 |

It's also possible to include child components, pass data to them, and receive callbacks from them:

11 | 12 | 14 | 15 | @functions { 16 | int currentCount; 17 | 18 | void IncrementCount() 19 | { 20 | currentCount++; 21 | } 22 | 23 | void OnResetCounter() 24 | { 25 | currentCount = 0; 26 | Render(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/FontWeight.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// A listing of all possible pre-defined font-weights. 5 | /// 6 | public enum FontWeight : byte 7 | { 8 | /// 9 | /// Represents a fount weight of 400. 10 | /// 11 | Normal, 12 | /// 13 | /// Represents a fount weight of 700. 14 | /// 15 | Bold, 16 | /// 17 | /// Makes the current font more bold (by 100). 18 | /// 19 | Bolder, 20 | /// 21 | /// Makes the current font less bold (by 100). 22 | /// 23 | Lighter, 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/OverflowMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration with possible overflow modes. 5 | /// 6 | public enum OverflowMode : byte 7 | { 8 | /// 9 | /// The overflow-mode is determined by the renderer. 10 | /// 11 | Auto, 12 | /// 13 | /// The content is allowed to overflow. 14 | /// 15 | Visible, 16 | /// 17 | /// The content is cut to prevent overflowing. 18 | /// 19 | Hidden, 20 | /// 21 | /// The content can be scrolled. 22 | /// 23 | Scroll 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Properties/Font/CssUnicodeRangeProperty.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | 5 | /// 6 | /// More information available at: 7 | /// https://developer.mozilla.org/en/docs/Web/CSS/@font-face 8 | /// 9 | sealed class CssUnicodeRangeProperty : CssProperty 10 | { 11 | #region ctor 12 | 13 | public CssUnicodeRangeProperty() 14 | : base(PropertyNames.UnicodeRange) 15 | { 16 | } 17 | 18 | #endregion 19 | 20 | #region Properties 21 | 22 | internal override IValueConverter Converter 23 | { 24 | get { return Converters.Any; } 25 | } 26 | 27 | #endregion 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/TextTrackMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Media 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// The modes of a text track. 7 | /// 8 | [DomName("TextTrackMode")] 9 | public enum TextTrackMode : byte 10 | { 11 | /// 12 | /// The text track is disabled. 13 | /// 14 | [DomName("disabled")] 15 | Disabled, 16 | /// 17 | /// The text track is hidden. 18 | /// 19 | [DomName("hidden")] 20 | Hidden, 21 | /// 22 | /// The text track is actually shown. 23 | /// 24 | [DomName("showing")] 25 | Showing 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Network/IResourceLoader.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Network 2 | { 3 | /// 4 | /// Interface used to handle resource requests for a document. These 5 | /// requests include, but are not limited to, media, script and styling 6 | /// resources. 7 | /// 8 | public interface IResourceLoader : ILoader 9 | { 10 | /// 11 | /// Performs an asynchronous request that can be cancelled. 12 | /// 13 | /// The options to consider. 14 | /// 15 | /// The task that will eventually give the resource's response data. 16 | /// 17 | IDownload DownloadAsync(ResourceRequest request); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/Startup.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Reflection; 3 | 4 | namespace Blazor.Runtime.Interop 5 | { 6 | public static class Startup 7 | { 8 | public static int EnsureAssembliesLoaded(string descriptor) 9 | { 10 | var parsed = MiniJSON.Json.Deserialize(descriptor) as IEnumerable; 11 | 12 | foreach (var assemblyName in parsed) 13 | { 14 | var assemblyNameString = assemblyName as string; 15 | if (assemblyNameString != null) 16 | { 17 | Assembly.Load(new AssemblyName(assemblyNameString)); 18 | } 19 | } 20 | 21 | return 0; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /template/MyApplication/wwwroot/sample-data/weather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DateFormatted": "06/05/2017", 4 | "TemperatureC": 1, 5 | "Summary": "Freezing", 6 | "TemperatureF": 33 7 | }, 8 | { 9 | "DateFormatted": "07/05/2017", 10 | "TemperatureC": 14, 11 | "Summary": "Bracing", 12 | "TemperatureF": 57 13 | }, 14 | { 15 | "DateFormatted": "08/05/2017", 16 | "TemperatureC": -13, 17 | "Summary": "Freezing", 18 | "TemperatureF": 9 19 | }, 20 | { 21 | "DateFormatted": "09/05/2017", 22 | "TemperatureC": -16, 23 | "Summary": "Balmy", 24 | "TemperatureF": 4 25 | }, 26 | { 27 | "DateFormatted": "10/05/2017", 28 | "TemperatureC": -2, 29 | "Summary": "Chilly", 30 | "TemperatureF": 29 31 | } 32 | ] -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssFontFeatureValuesRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents a @font-feature-values CSS rule. 8 | /// 9 | [DomName("CSSFontFeatureValuesRule")] 10 | public interface ICssFontFeatureValuesRule : ICssRule 11 | { 12 | /// 13 | /// Gets or sets the list of one or more font families for 14 | /// which a given set of feature values is defined. 15 | /// 16 | [DomName("fontFamily")] 17 | String Family { get; set; } 18 | 19 | //More information available at: 20 | //http://dev.w3.org/csswg/css-fonts/#om-fontfeaturevalues 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Shared/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace ClientServerApp.Shared 4 | { 5 | public class WeatherForecast 6 | { 7 | public string DateFormatted { get; set; } 8 | public int TemperatureC { get; set; } 9 | public string Summary { get; set; } 10 | 11 | // This property doesn't need to be serialized because it's computed dynamically. 12 | // This shows that the property evaluation logic runs on the client as well as 13 | // on the server. 14 | [JsonIgnore] 15 | public int TemperatureF 16 | { 17 | get 18 | { 19 | return 32 + (int)(TemperatureC / 0.5556); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssMarginRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents a margin CSS rule (e.g. in an @page at-rule). 8 | /// 9 | [DomName("CSSMarginRule")] 10 | public interface ICssMarginRule : ICssRule 11 | { 12 | /// 13 | /// Gets the name of the margin rule. 14 | /// 15 | [DomName("name")] 16 | String Name { get; } 17 | 18 | /// 19 | /// Gets the style object for the margin at-rule. 20 | /// 21 | [DomName("style")] 22 | [DomPutForwards("cssText")] 23 | ICssStyleDeclaration Style { get; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/ClientServerApp/ClientServerApp.Client/CounterDisplay.cshtml: -------------------------------------------------------------------------------- 1 | @TagName("counter-display") 2 | 3 |
4 | Current count is: @currentCount 5 | 6 |
7 | 8 | @functions { 9 | // It would be cleaner if we could mark properties with [FromAttribute] or similar, 10 | // instead of having to extract them from a dictionary manually. 11 | private int currentCount; 12 | private Action resetCounterCallback; 13 | 14 | protected override void ReceiveParameters(IDictionary parameters) 15 | { 16 | currentCount = (int)parameters["current-count"]; 17 | resetCounterCallback = (Action)parameters["on-reset"]; 18 | } 19 | } -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/TextAnchor.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration with all possible text anchors. 5 | /// 6 | public enum TextAnchor : byte 7 | { 8 | /// 9 | /// The rendered characters are aligned such that the start of the 10 | /// text string is at the initial current text position 11 | /// 12 | Start, 13 | /// 14 | /// The rendered characters are aligned such that the middle of the 15 | /// text string is at the current text position. 16 | /// 17 | Middle, 18 | /// 19 | /// The rendered characters are aligned such that the end of the 20 | /// text string is at the initial current text position. 21 | /// 22 | End 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/AdjacentPosition.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | /// 4 | /// Enumeration with possible values for the adjacent position insertation. 5 | /// 6 | public enum AdjacentPosition : byte 7 | { 8 | /// 9 | /// Before the element itself. 10 | /// 11 | BeforeBegin, 12 | /// 13 | /// Just inside the element, before its first child. 14 | /// 15 | AfterBegin, 16 | /// 17 | /// Just inside the element, after its last child. 18 | /// 19 | BeforeEnd, 20 | /// 21 | /// After the element itself. 22 | /// 23 | AfterEnd 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/BoxModel.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration with the various box sizing models / clip or origins. 5 | /// 6 | public enum BoxModel : byte 7 | { 8 | /// 9 | /// The background extends to the outside edge of the border (but underneath the border in z-ordering). 10 | /// 11 | BorderBox, 12 | /// 13 | /// No background is drawn below the border (background extends to the outside edge of the padding). 14 | /// 15 | PaddingBox, 16 | /// 17 | /// The background is painted within (clipped to) the content box. 18 | /// 19 | ContentBox, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Css/IValueConverter.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css 2 | { 3 | using System.Collections.Generic; 4 | using AngleSharp.Parser.Css; 5 | using AngleSharp.Dom.Css; 6 | 7 | interface IValueConverter 8 | { 9 | IPropertyValue Convert(IEnumerable value); 10 | 11 | IPropertyValue Construct(CssProperty[] properties); 12 | } 13 | 14 | static class PropertyExtensions 15 | { 16 | public static IPropertyValue Guard(this CssProperty[] properties) 17 | { 18 | if (properties.Length == 1) 19 | { 20 | var value = properties[0].DeclaredValue; 21 | return value is T ? properties[0].DeclaredValue : null; 22 | } 23 | 24 | return null; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/MediaFeatures/UnknownMediaFeature.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | using System; 5 | 6 | sealed class UnknownMediaFeature : MediaFeature 7 | { 8 | #region ctor 9 | 10 | public UnknownMediaFeature(String name) 11 | : base(name) 12 | { 13 | } 14 | 15 | #endregion 16 | 17 | #region Internal Properties 18 | 19 | internal override IValueConverter Converter 20 | { 21 | get { return Converters.Any; } 22 | } 23 | 24 | #endregion 25 | 26 | #region Methods 27 | 28 | public override Boolean Validate(RenderDevice device) 29 | { 30 | return true; 31 | } 32 | 33 | #endregion 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/IProcessingInstruction.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// A processing instruction provides an opportunity for 8 | /// application-specific instructions to be embedded within XML and which 9 | /// can be ignored by XML processors which do not support processing their 10 | /// instructions (outside of their having a place in the DOM). 11 | /// 12 | [DomName("ProcessingInstruction")] 13 | public interface IProcessingInstruction : ICharacterData 14 | { 15 | /// 16 | /// Gets the target of the processing instruction. 17 | /// 18 | [DomName("target")] 19 | String Target { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/WheelMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Events 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// Enumeration with the various mouse wheel modes. 7 | /// 8 | [DomName("WheelEvent")] 9 | public enum WheelMode : byte 10 | { 11 | /// 12 | /// The unit of change is pixels. 13 | /// 14 | [DomName("DOM_DELTA_PIXEL")] 15 | Pixel = 0x0, 16 | /// 17 | /// The unit of change is lines. 18 | /// 19 | [DomName("DOM_DELTA_LINE")] 20 | Line = 0x1, 21 | /// 22 | /// The unit of change is pages. 23 | /// 24 | [DomName("DOM_DELTA_PAGE")] 25 | Page = 0x2 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssNamespaceRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents a namespace declaration CSS rule. 8 | /// 9 | [DomName("CSSNamespaceRule")] 10 | public interface ICssNamespaceRule : ICssRule 11 | { 12 | /// 13 | /// Gets the URI of the given namespace. 14 | /// 15 | [DomName("namespaceURI")] 16 | String NamespaceUri { get; set; } 17 | 18 | /// 19 | /// Gets the prefix associated to this namespace. 20 | /// If there is no such prefix, returns null. 21 | /// 22 | [DomName("prefix")] 23 | String Prefix { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Services/ICssPropertyFactory.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Services 2 | { 3 | using AngleSharp.Dom.Css; 4 | using System; 5 | using System.Collections.Generic; 6 | 7 | interface ICssPropertyFactory 8 | { 9 | CssProperty Create(String name); 10 | CssProperty CreateFont(String name); 11 | CssProperty CreateLonghand(String name); 12 | CssProperty[] CreateLonghandsFor(String name); 13 | CssShorthandProperty CreateShorthand(String name); 14 | CssProperty CreateViewport(String name); 15 | String[] GetLonghands(String name); 16 | IEnumerable GetShorthands(String name); 17 | Boolean IsAnimatable(String name); 18 | Boolean IsLonghand(String name); 19 | Boolean IsShorthand(String name); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// 7 | /// Represents state machines generated for asynchronous methods. 8 | /// This type is intended for compiler use only. 9 | /// 10 | public interface IAsyncStateMachine 11 | { 12 | /// Moves the state machine to its next state. 13 | void MoveNext(); 14 | /// Configures the state machine with a heap-allocated replica. 15 | /// The heap-allocated replica. 16 | void SetStateMachine(IAsyncStateMachine stateMachine); 17 | } 18 | } -------------------------------------------------------------------------------- /src/AngleSharp/Html/Submitters/Json/JsonValue.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html.Submitters.Json 2 | { 3 | using AngleSharp.Extensions; 4 | using System; 5 | using System.Globalization; 6 | 7 | sealed class JsonValue : JsonElement 8 | { 9 | readonly String _value; 10 | 11 | public JsonValue(String value) 12 | { 13 | _value = value.CssString(); 14 | } 15 | 16 | public JsonValue(Double value) 17 | { 18 | _value = value.ToString(CultureInfo.InvariantCulture); 19 | } 20 | 21 | public JsonValue(Boolean value) 22 | { 23 | _value = value ? "true" : "false"; 24 | } 25 | 26 | public override String ToString() 27 | { 28 | return _value; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Blazor.Runtime/Interop/FakeMvcTypes.cs: -------------------------------------------------------------------------------- 1 | // The types in this file need to be defined otherwise Razor tooling shows 2 | // errors in the VS errors list. It doesn't matter that these are fake, since 3 | // they aren't actually used anyway. 4 | 5 | using System; 6 | 7 | namespace Microsoft.AspNetCore.Mvc 8 | { 9 | public interface IUrlHelper { } 10 | public interface IViewComponentHelper { } 11 | } 12 | 13 | namespace Microsoft.AspNetCore.Mvc.Rendering 14 | { 15 | public interface IJsonHelper { } 16 | public interface IHtmlHelper { } 17 | } 18 | 19 | namespace Microsoft.AspNetCore.Mvc.ViewFeatures 20 | { 21 | public interface IModelExpressionProvider { } 22 | } 23 | 24 | namespace Microsoft.AspNetCore.Mvc.Razor.Internal 25 | { 26 | public class RazorInjectAttributeAttribute : Attribute { } 27 | } -------------------------------------------------------------------------------- /src/AngleSharp/Interfaces/Css/ICssPageRule.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Attributes; 4 | using System; 5 | 6 | /// 7 | /// Represents the @page CSS rule. 8 | /// 9 | [DomName("CSSPageRule")] 10 | public interface ICssPageRule : ICssRule 11 | { 12 | /// 13 | /// Gets or sets the textual representation of the selector for this rule, e.g. "h1,h2". 14 | /// 15 | [DomName("selectorText")] 16 | String SelectorText { get; set; } 17 | 18 | /// 19 | /// Gets the CSSStyleDeclaration object for the rule. 20 | /// 21 | [DomName("style")] 22 | [DomPutForwards("cssText")] 23 | ICssStyleDeclaration Style { get; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/TextDecorationStyle.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// An enumeration with the various text decoration styles. 5 | /// 6 | public enum TextDecorationStyle : byte 7 | { 8 | /// 9 | /// Draws a single line. 10 | /// 11 | Solid, 12 | /// 13 | /// Draws a double line. 14 | /// 15 | Double, 16 | /// 17 | /// Draws a dotted line. 18 | /// 19 | Dotted, 20 | /// 21 | /// Draws a dashed line. 22 | /// 23 | Dashed, 24 | /// 25 | /// Draws a wavy line. 26 | /// 27 | Wavy 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Constants/ClearMode.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | /// 4 | /// The enumeration with all possible clear modes. 5 | /// 6 | public enum ClearMode : byte 7 | { 8 | /// 9 | /// The element is not moved down to clear past floating elements. 10 | /// 11 | None, 12 | /// 13 | /// The element is moved down to clear past left floats. 14 | /// 15 | Left, 16 | /// 17 | /// The element is moved down to clear past right floats. 18 | /// 19 | Right, 20 | /// 21 | /// The element is moved down to clear past both left and right floats. 22 | /// 23 | Both 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AngleSharp/Html/TextDataSetEntry.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Html 2 | { 3 | using System; 4 | using System.Text; 5 | 6 | /// 7 | /// A text entry in a form. 8 | /// 9 | sealed class TextDataSetEntry : FormDataSetEntry 10 | { 11 | readonly String _value; 12 | 13 | public TextDataSetEntry(String name, String value, String type) 14 | : base(name, type) 15 | { 16 | _value = value; 17 | } 18 | 19 | public override Boolean Contains(String boundary, Encoding encoding) 20 | { 21 | return _value != null && _value.Contains(boundary); 22 | } 23 | 24 | public override void Accept(IFormDataSetVisitor visitor) 25 | { 26 | visitor.Text(this, _value); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Blazor.Host/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace Blazor.Sdk 5 | { 6 | class Program 7 | { 8 | static int Main(string[] args) 9 | { 10 | if (args.Length == 0) 11 | { 12 | Console.WriteLine("Usage: dotnet blazor "); 13 | return 1; 14 | } 15 | 16 | var command = args[0]; 17 | var remainingArgs = args.Skip(1).ToArray(); 18 | 19 | switch (command.ToLowerInvariant()) 20 | { 21 | case "serve": 22 | Host.Program.Main(remainingArgs); 23 | return 0; 24 | default: 25 | throw new InvalidOperationException($"Unknown command: {command}"); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/MediaControllerPlaybackState.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Media 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// An enumeration over the various playback states. 7 | /// 8 | [DomName("MediaControllerPlaybackState")] 9 | public enum MediaControllerPlaybackState : byte 10 | { 11 | /// 12 | /// Waiting for the media to be ready. 13 | /// 14 | [DomName("waiting")] 15 | Waiting, 16 | /// 17 | /// Playing the current media. 18 | /// 19 | [DomName("playing")] 20 | Playing, 21 | /// 22 | /// The media has already finished playing. 23 | /// 24 | [DomName("ended")] 25 | Ended 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Constants/FilterResult.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom 2 | { 3 | using AngleSharp.Attributes; 4 | 5 | /// 6 | /// An enumeration that contains the valid results of examining a node. 7 | /// 8 | [DomName("NodeFilter")] 9 | public enum FilterResult : byte 10 | { 11 | /// 12 | /// The Node is accepted. 13 | /// 14 | [DomName("FILTER_ACCEPT")] 15 | Accept = 1, 16 | /// 17 | /// The Node (and its children) are rejected. 18 | /// 19 | [DomName("FILTER_REJECT")] 20 | Reject = 2, 21 | /// 22 | /// The Node is skipped. Children are still considered. 23 | /// 24 | [DomName("FILTER_SKIP")] 25 | Skip = 3 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/DocumentFunctions/UrlFunction.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | using System; 5 | 6 | /// 7 | /// Take an url. 8 | /// 9 | sealed class UrlFunction : DocumentFunction 10 | { 11 | #region Fields 12 | 13 | readonly Url _expected; 14 | 15 | #endregion 16 | 17 | #region ctor 18 | 19 | public UrlFunction(String url) 20 | : base(FunctionNames.Url, url) 21 | { 22 | _expected = Url.Create(Data); 23 | } 24 | 25 | #endregion 26 | 27 | #region Methods 28 | 29 | public override Boolean Matches(Url actual) 30 | { 31 | return !_expected.IsInvalid && _expected.Equals(actual); 32 | } 33 | 34 | #endregion 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/DNA/corlib/System.Runtime.CompilerServices/INotifyCompletion.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// 7 | /// Represents an operation that will schedule continuations when the operation completes. 8 | /// 9 | public interface INotifyCompletion 10 | { 11 | /// Schedules the continuation action to be invoked when the instance completes. 12 | /// The action to invoke when the operation completes. 13 | /// The argument is null (Nothing in Visual Basic). 14 | void OnCompleted(Action continuation); 15 | } 16 | } -------------------------------------------------------------------------------- /template/Blazor.VSExtension/Properties/template-builder.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 13 | 14 | 15 | My Custom Templates 16 | 17 | false 18 | 19 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Html/HtmlDataElement.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Html 2 | { 3 | using AngleSharp.Extensions; 4 | using AngleSharp.Html; 5 | using System; 6 | 7 | /// 8 | /// Represents the HTML data element. 9 | /// 10 | sealed class HtmlDataElement : HtmlElement, IHtmlDataElement 11 | { 12 | #region ctor 13 | 14 | public HtmlDataElement(Document owner, String prefix = null) 15 | : base(owner, TagNames.Data, prefix) 16 | { 17 | } 18 | 19 | #endregion 20 | 21 | #region Properties 22 | 23 | public String Value 24 | { 25 | get { return this.GetOwnAttribute(AttributeNames.Value); } 26 | set { this.SetOwnAttribute(AttributeNames.Value, value); } 27 | } 28 | 29 | #endregion 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/AngleSharp/Dom/Css/Properties/Text/CssWordBreakProperty.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Dom.Css 2 | { 3 | using AngleSharp.Css; 4 | 5 | /// 6 | /// Information: 7 | /// https://developer.mozilla.org/en-US/docs/Web/CSS/word-beak 8 | /// Specify whether to break lines within words. 9 | /// 10 | sealed class CssWordBreakProperty : CssProperty 11 | { 12 | #region Fields 13 | 14 | static readonly IValueConverter StyleConverter = Converters.WordBreakConverter; 15 | 16 | #endregion 17 | 18 | #region ctor 19 | 20 | public CssWordBreakProperty() 21 | : base(PropertyNames.WordBreak) 22 | { 23 | } 24 | 25 | #endregion 26 | 27 | #region Properties 28 | 29 | internal override IValueConverter Converter 30 | { 31 | get 32 | { 33 | return StyleConverter; 34 | } 35 | } 36 | 37 | #endregion 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/AngleSharp/AngleSharp.Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Library 6 | Properties 7 | AngleSharp 8 | AngleSharp 9 | netstandard1.3 10 | Blazor.AngleSharp 11 | $(MSBuildThisFileDirectory)../../artifacts/ 12 | 13 | 20 | -------------------------------------------------------------------------------- /src/AngleSharp/Css/ValueConverters/RequiredValueConverter.cs: -------------------------------------------------------------------------------- 1 | namespace AngleSharp.Css.ValueConverters 2 | { 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using AngleSharp.Dom.Css; 6 | using AngleSharp.Parser.Css; 7 | 8 | sealed class RequiredValueConverter : IValueConverter 9 | { 10 | readonly IValueConverter _converter; 11 | 12 | public RequiredValueConverter(IValueConverter converter) 13 | { 14 | _converter = converter; 15 | } 16 | 17 | public IPropertyValue Convert(IEnumerable value) 18 | { 19 | return value.Any() ? _converter.Convert(value) : null; 20 | } 21 | 22 | public IPropertyValue Construct(CssProperty[] properties) 23 | { 24 | return _converter.Construct(properties); 25 | } 26 | } 27 | } 28 | --------------------------------------------------------------------------------