winsw/doc/projectStructure.md

2.4 KiB

Project Structure

đŸŽĨ You can find code dive session recorded video here

|_ doc
|_ eng
|_ examples
|_ src
    |_ Core
    |   |_ ServiceWrapper
    |   |_ WinSWCore
    |_ Plugins
    |_ Test/winswTest

📂 doc

This directory contains all the documents related to WinSW project.

📂 eng

📄 build.yaml

This contains Build configurations. We have another relase pipeline which is not yet added to this repository and will be added in later.

📂 examples

This folder contains templates for configuration files. Currently there are XML configuration templates. YAML templates will be added in later.

📄 sample-minimal.xml

This contains a template for mandotory configurations.

📄 sample-allOptions.xml

This template contains all possible configurations with documentation.

📂 src

This contains the implementation for the WinSW.

📂 Core

📓 ServiceWrapper

This is the main executable project.

|_ ServiceWrapper
    |_ Logging
    |   |_ WrapperServiceEventLogProvider.cs
    |_ Properties
    |   |_ AssemblyInfo.cs
    |_ Main.cs
    |_ NullableAttributes.cs
    |_ winsw.csproj

📄 Main.cs

This file contains the entry point of the program. (Main method). This file includes the main flow of the program and has implemented the logics for command line arguments.
ex : install, uninstall, start, stop, restart

📓 WinSWCore

|_ WinSWCore
    |_ Configuration
    |_ Extensions
    |_ Logging
    |_ Native
    |_ Util
    |_ Download.cs
    |_ DynamicProxy.cs
    |_ LogAppenders.cs
    |_ NullableAttributes.cs
    |_ PeriodicRollingCalendar.cs
    |_ ServiceDescriptor.cs
    |_ WinSWCore.csproj
    |_ WinSWException.cs
    |_ WinSWSystem.cs
    |_ Wmi.cs
    |_ WmiSchema.cs

📄 ServiceDescriptor.cs

This contains the logics for extracting configurations from XML file. ServiceDescriptor class get XML file as a argument. Currently configuratinos are provided on demand.

📂 Configuration

📄 IWinSWConfiguration.cs

IWinSWConfigurations interface contains all configurations.

📄 DefaultSettings.cs

This contains default values for all configurations which included in IWinSWConfiguration.cs.