ReactiveProperty 项目教程

ReactiveProperty 项目教程

ReactivePropertyReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions. Target frameworks are .NET 6+, .NET Framework 4.7.2 and .NET Standard 2.0.项目地址:https://gitcode.com/gh_mirrors/re/ReactiveProperty

1. 项目的目录结构及介绍

ReactiveProperty 项目的目录结构如下:

ReactiveProperty/
├── src/
│   ├── ReactiveProperty/
│   │   ├── Properties/
│   │   ├── ReactiveProperty.csproj
│   │   ├── README.md
│   │   └── ...
│   ├── ReactiveProperty.Core/
│   │   ├── Properties/
│   │   ├── ReactiveProperty.Core.csproj
│   │   └── ...
│   ├── ReactiveProperty.WPF/
│   │   ├── Properties/
│   │   ├── ReactiveProperty.WPF.csproj
│   │   └── ...
│   └── ...
├── samples/
│   ├── WpfApp1/
│   │   ├── Properties/
│   │   ├── WpfApp1.csproj
│   │   └── ...
│   └── ...
├── .gitignore
├── LICENSE
├── README.md
└── ...

目录结构介绍

  • src/:包含项目的源代码。
    • ReactiveProperty/:核心库的源代码。
    • ReactiveProperty.Core/:核心库的基础功能。
    • ReactiveProperty.WPF/:针对 WPF 平台的扩展。
    • ...
  • samples/:包含示例应用程序。
    • WpfApp1/:一个 WPF 示例应用程序。
    • ...
  • .gitignore:Git 忽略文件。
  • LICENSE:项目许可证。
  • README.md:项目说明文档。
  • ...

2. 项目的启动文件介绍

samples/WpfApp1/ 目录下,启动文件为 App.xamlApp.xaml.cs

App.xaml

<Application x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <!-- 应用程序资源 -->
    </Application.Resources>
</Application>

App.xaml.cs

using System.Windows;

namespace WpfApp1
{
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            // 启动逻辑
        }
    }
}

3. 项目的配置文件介绍

src/ReactiveProperty/ 目录下,主要的配置文件为 ReactiveProperty.csproj

ReactiveProperty.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>net6.0;net472;netstandard2.0</TargetFrameworks>
    <Version>7.8.10</Version>
    <PackageId>ReactiveProperty</PackageId>
    <Description>ReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions.</Description>
    <Authors>neuecc, runceel</Authors>
    <PackageProjectUrl>https://github.com/runceel/ReactiveProperty</PackageProjectUrl>
    <RepositoryUrl>https://github.com/runceel/ReactiveProperty.git</RepositoryUrl>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <RootNamespace>ReactiveProperty</RootNamespace>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.Reactive" Version="5.0.0" />
    <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\ReactiveProperty.Core\ReactiveProperty.Core.csproj" />
  </ItemGroup>

</Project>

配置文件介绍

  • TargetFrameworks:指定项目支持的目标框架。
  • Version:项目的版本号。
  • `PackageId

ReactivePropertyReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions. Target frameworks are .NET 6+, .NET Framework 4.7.2 and .NET Standard 2.0.项目地址:https://gitcode.com/gh_mirrors/re/ReactiveProperty

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

顾淑慧Beneficient

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值