Service installation and uninstallation

Windows Services: Install & Uninstall via InstallUtil.exe Command‑Line and Common Troubleshooting 1. Installing and Uninstalling Windows Services from Command‑Line 1. Tools Microsoft provides InstallUtil.exe for installing and uninstalling .NET Windows …

Your first Windows Service

1. Create a New Windows Service Project Note: Newer Visual Studio versions no longer include this built‑in template. It is only supported for .NET Framework; for .NET Core/.NET 5+, the …

Windows Service

1. What is a Windows Service A Windows Service is a type of program that runs in the background to perform specific tasks. Its key features are: Usage Scenarios Best …

Check existence

Check whether a Key exists in Redis IDatabase.KeyExists(string key)Purpose: Check whether the specified key exists in Redis It returns true as long as the key exists, works for all data …

Write value

StackExchange.Redis Generic Set / Get for write‑and‑read operations Required namespaces The example below uses Set, accepts a key, byte array, and expiration duration. Notes The earlier WinForms sample used hard‑coded …

Connect to Redis

This lesson demonstrates Redis operations inside WinForms. The logic applies to other project types; WinForms is used only for demonstration purposes. After you install Redis, it runs as an independent …

Demonstrate Redis with WinForms

This section covers C# WinForms Redis cache wrapper based on StackExchange.Redis Open Visual Studio, create a WinForms project, then install dependency packages via NuGet Install Dependencies Redis Wrapper Methods Demonstrate …

Installation

Windows Redis 3.2.100 Installation and Startup Download Links Core Files After Extraction File Purpose redis‑server.exe Redis server program redis‑cli.exe Redis command‑line client tool redis.windows.conf Default configuration file redis.windows‑service.conf Dedicated config …

Introduction

Redis Basic Definition Redis is an open‑source software written in ANSI C, network‑accessible key‑value database / storage system that supports in‑memory storage and data persistence. It provides client APIs for …

Escape characters and #if conditionals

Backslash Escape + #if Conditional Syntax 1. Backslash \ Escape Rules Pre‑defined variable:#set($dog = “woof woof”) VTL Code Rendered Output Explanation $dog woof woof Normal variable resolution \$dog $dog Single …

Extension methods

1. Backend Person Entity Code (C#) Set object variables in C# backend code 2. VTL Template Code & Rendering Notes 1. $pTest.getMyName() ✅ Velocity parameter‑less method call: parentheses () can …

Iterate collections

Velocity #foreach Iterate over Collections & Objects 1. Iterate over String List C# Back‑end Code Velocity Template Code Execution result: Loop through each string in the list and output with …

Comments

1. Distinction of Template Comments Syntax Type Features <!– HTML comment –> Native HTML comment Output to final webpage source code, visible when viewing page source in browser ## Single‑line …

Template reuse

1. Core Purpose The Velocity template engine achieves template reuse via #include / #parse.Common webpage sections such as page header navigation _head.htm and footer copyright _footer.htm can be extracted into …

Fundamental template syntax

1. Pass Entity Objects to Templates 1.1 PageInfo Entity Class Previously we passed simple strings, which is inefficient and hard‑to‑maintain. Wrapping data into entity objects makes code much clearer. 1.2 …

Serialization and deserialization

Let’s recap serialization from the previous section, which converts an entity object into a JSON string. Serialization Generated JSON output Deserialization Convert a JSON string back to an entity object …