This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"profiles": { | |
"MyUnoApp.Server": { | |
"commandName": "Project", | |
"launchBrowser": true, | |
"environmentVariables": { | |
"ASPNETCORE_ENVIRONMENT": "Development" | |
}, | |
"applicationUrl": "https://localhost:51042;http://localhost:51043", | |
"devTunnelEnabled": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var attributeData = typeof(TestClass).GetCustomAttributesData(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
var attributeData = CustomAttributeData.GetCustomAttributes(typeof(TestClass))[0]; | |
Console.WriteLine(attributeData.AttributeType == typeof(TestAttribute)); // true | |
Console.WriteLine(attributeData.ConstructorArguments[0].Value); // "Hello World" | |
[Test("Hello, world!")] | |
public class TestClass | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Uno.Wasm.Bootstrap.Server; | |
... | |
app.UseAuthentication(); | |
app.UseAuthorization(); | |
app.UseUnoFrameworkFiles(); | |
app.MapFallbackToFile("index.html"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reading = Gamepad.GetCurrentReading(); | |
Buttons = reading.Buttons; | |
RightThumbstickX = reading.RightThumbstickX; | |
RightThumbstickY = reading.RightThumbstickY; | |
LeftThumbstickX = reading.LeftThumbstickX; | |
LeftThumbstickY = reading.LeftThumbstickY; | |
LeftTrigger = reading.LeftTrigger; | |
RightTrigger = reading.RightTrigger; | |
Timestamp = reading.Timestamp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gamepad.GamepadAdded += GamepadAdded; | |
Gamepad.GamepadRemoved += GamepadRemoved; | |
private void GamepadAdded(object sender, Gamepad gamepad) | |
{ | |
Debug.WriteLine("A gamepad was connected"); | |
} | |
private void GamepadRemoved(object sender, Gamepad gamepad) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var UnoAppManifest = { | |
splashScreenImage: "Assets/SplashScreen.png", | |
splashScreenColor: "transparent", | |
displayName: "Theme-aware splash screen", | |
darkThemeBackgroundColor: "blue", | |
lightThemeBackgroundColor: "yellow", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var UnoAppManifest = { | |
splashScreenImage: "Assets/SplashScreen.png", | |
splashScreenColor: "transparent", | |
displayName: "Theme-aware splash screen" | |
} |