Skip to content

Instantly share code, notes, and snippets.


Rasika Gayan Gunarathna rasikag

View GitHub Profile
rasikag / examplecomponent.ts
Last active Mar 5, 2019
View examplecomponent.ts
selector: 'app-example-page',
templateUrl: './app-example-page.component.html',
styleUrls: ['./app-example-page.component.css'],
providers: [ ExampleService ]
View ngmodule.ts
providers: [ExampleService]
View exampleservice.ts
import { Injectable } from '@angular/core';
providedIn: 'root'
export class ExampleService {
constructor() { }
View Product.cs
class Product
public string Name { get; private set; }
public decimal Price { get; private set; }
public Product(string name, decimal price)
Name = name;
Price = price;
View ModeChangesUpdateHub.cs
public class ModeChangesUpdateHub : Hub
private readonly CheckMode _checkMode;
public ModeChangesUpdateHub() :
View CheckMode.cs
public class CheckMode
private readonly static Lazy<CheckMode> _instance
= new Lazy<CheckMode>(() => new CheckMode(
private IHubConnectionContext<dynamic> Clients { get; set; }
View API_Endpoint.cs
public IHttpActionResult CreateTrigger()
logger.Error("start point of create trigger");
new CheckMode();
catch (Exception ex)
logger.Error("Message: "+ex.Message + Environment.NewLine + "Stack Trace: "+ ex.StackTrace);
View Error
An error occurred while calling method 'ConfigureServices' on startup class 'Startup'. Consider using IDbContextFactory to override the initialization of the DbContext at design-time. Error: This method could not find a user secret ID because the application's entry assembly is not set. Try using the ".AddUserSecrets(string userSecretsId)" or ".AddUserSecrets<TStartup>()" method instead.
View Menifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="" />
View FlashLightBackGroundService
public class FlashLightBackGroundService extends IntentService {
private static Camera mCamera;
private Camera.Parameters mParams;
public FlashLightBackGroundService() {
You can’t perform that action at this time.