Skip to content

Instantly share code, notes, and snippets.

View tusmester's full-sized avatar
🎯
Cleaning up stuff and preparing for the future.

Miklós Tóth tusmester

🎯
Cleaning up stuff and preparing for the future.
View GitHub Profile
using System;
using System.IO;
namespace SenseNet.ContentRepository.Tests.Data
{
internal class FileSystemChunkWriterStream : Stream
{
private readonly Guid _id;
private readonly int _chunkSize;
using System;
using System.IO;
namespace SenseNet.ContentRepository.Tests.Data
{
internal class FileSystemChunkReaderStream : Stream
{
private readonly string _directoryPath;
private readonly int _chunkSize;
using SenseNet.ContentRepository.Storage.Data.SqlClient.Blob;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using SenseNet.Diagnostics;
namespace SenseNet.ContentRepository.Tests.Data
@tusmester
tusmester / post.snmvc.views.index2.cshtml
Created February 8, 2018 13:03
#sn #mvc #view #index #dashboard
@{
ViewBag.Title = "Dashboard";
}
@using SenseNet.ContentRepository.Storage.Security
@using SenseNet.Portal.Helpers
@model SnWebApplication.Models.DashboardViewModel
<h2>@ViewBag.Title</h2>
<h3>@ViewBag.Message</h3>
@tusmester
tusmester / post.snmvc.dashboardcontroller2.cs
Created February 8, 2018 13:01
#sn #mvc #controller #dashboard
using System;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using SNCR = SenseNet.ContentRepository;
using SenseNet.ContentRepository.Storage;
using SenseNet.ContentRepository.Storage.Security;
using SnWebApplication.Models;
namespace SnWebApplication.Controllers
@tusmester
tusmester / post.snmvc.views.deletetask.cshtml
Created February 8, 2018 13:00
#sn #mvc #view #deletetask
@{
ViewBag.Title = "Delete task";
ViewBag.Message = "Are you sure you want to delete this task?";
}
@using SnWebApplication.Models
@model TaskViewModel
<h2>@ViewBag.Title</h2>
<h3>@ViewBag.Message</h3>
@tusmester
tusmester / post.snmvc.views.create.cshtml
Created February 8, 2018 12:58
#sn #mvc #view #create
@{
ViewBag.Title = "Create task";
}
@using SnWebApplication.Models
@model TaskViewModel
<h2>@ViewBag.Title</h2>
<div class="row">
<div class="col-md-8">
@tusmester
tusmester / post.snmvc.views.login.cshtml
Created February 8, 2018 12:56
#sn #mvc #view #login
@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
using (Html.BeginRouteForm("Default", new
{
ReturnUrl = ViewBag.ReturnUrl,
controller = "Account",
action = "LogOff"
}, FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
{
@tusmester
tusmester / post.snmvc.auth.logoff.cs
Created February 8, 2018 12:53
#sn #mvc #authentication
public ActionResult LogOff()
{
SenseNet.Portal.Virtualization.AuthenticationHelper.Logout();
return RedirectToLocal("/");
}
@tusmester
tusmester / post.snmvc.taskviewmodel.cs
Created February 8, 2018 12:52
#sn #mvc #viewmodel #task
using System;
using System.ComponentModel.DataAnnotations;
using SenseNet.ContentRepository;
using SenseNet.ContentRepository.Storage.Security;
namespace SnWebApplication.Models
{
public class TaskViewModel
{
public readonly Task Task;