首页 > 其他分享 >学习011-08-03-01 Numeric Properties in XPO(XPO中的数字属性)

学习011-08-03-01 Numeric Properties in XPO(XPO中的数字属性)

时间:2024-10-09 11:47:30浏览次数:3  
标签:03 set return private nameof SetPropertyValue 01 XPO ref

Numeric Properties in XPO(XPO中的数字属性)

The example below illustrates how to implement Numeric Properties in an XPO persistent class.
下面的示例说明了如何在XPO持久类中实现数字属性。

C#
private double doubleProperty;
public double DoubleProperty {
    get { return doubleProperty; }
    set { SetPropertyValue(nameof(DoubleProperty), ref doubleProperty, value); }
}
private float singleProperty;
public float SingleProperty {
    get { return singleProperty; }
    set { SetPropertyValue(nameof(SingleProperty), ref singleProperty, value); }
}
private long longProperty;
public long LongProperty {
    get { return longProperty; }
    set { SetPropertyValue(nameof(LongProperty), ref longProperty, value); }
}
private int integerProperty;
public int IntegerProperty {
    get { return integerProperty; }
    set { SetPropertyValue(nameof(IntegerProperty), ref integerProperty, value); }
}
private decimal decimalProperty;
public decimal DecimalProperty {
    get { return decimalProperty; }
    set { SetPropertyValue(nameof(DecimalProperty), ref decimalProperty, value); }
}
private byte byteProperty;
public byte ByteProperty {
    get { return byteProperty; }
    set { SetPropertyValue(nameof(ByteProperty), ref byteProperty, value); }
}

标签:03,set,return,private,nameof,SetPropertyValue,01,XPO,ref
From: https://blog.csdn.net/thomastang200912_126/article/details/142783102

相关文章

  • 学习011-08-03-02 Numeric Properties in EF Core(EF Core中的数字属性)
    NumericPropertiesinEFCore(EFCore中的数字属性)TheexamplebelowillustrateshowtoimplementNumericPropertiesinanEFCoreclass.下面的示例说明了如何在EFCore类中实现数字属性。C#publicvirtualdoubleDoubleProperty{get;set;}publicvirtual......
  • Docker 环境下 GPU 监控实战:使用 Prometheus 实现 DCGM Exporter 部署与 GPU 性能监控
    Docker环境下GPU监控实战:使用Prometheus实现DCGMExporter部署与GPU性能监控文章目录Docker环境下GPU监控实战:使用Prometheus实现DCGMExporter部署与GPU性能监控一查看当前GPU信息二dcgm-exporter部署1)Dockerrun运行2)Dockercompose运行三......
  • nacos gateway 调用服务报错503 Server unavailable
    环境springboot3jdk17依赖<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-bootstrap</artifactId></dependency><dependency><groupId>org.springframe......
  • JOI Open 2018
    T1BubbleSort2题意:给定一个长度为\(n\)的序列\(a\),进行\(q\)次修改,第\(i\)次将第\(x_i\)个元素的值修改为\(y_i\)。对于每次操作后,你都需要求出,如果此时对序列进行冒泡排序,需要多少次冒泡才能完成排序。\(n\le5\times10^5\)。序列有序意味着,每个数前面都没......
  • Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to ma
    这个错误通常发生在使用SpringAOP时,尤其是当你尝试访问AopContext.currentProxy(),但当前代理对象不可用时。下面是一些解决此问题的建议:1.启用 exposeProxy 属性确保你的AOP配置中设置了exposeProxy属性为true。这可以在使用注解或XML配置中进行设置使用注解如......
  • 牛客小白月赛101 A~E
    牛客小白月赛101A~EA-tb的区间问题题意:tb给了fc一个长度为n的数组A,fc对A进行k次如下操作:删除数组第一个元素或者删除数组最后一个元素。求最后得到的数组和的最大值。思路:最后删除的是某一组前后缀,一一去枚举可行的区间即可。//AConemoretimes//nndbk......
  • 代码随想录算法训练营第三天|链表理论基础、203.移除链表元素、707.设计链表、206.反
    链表理论基础链表的类型单链表每一个节点由两部分组成,一个是数据域一个是指针域(存放指向下一个节点的指针),最后一个节点的指针域指向null(空指针的意思)。链表的入口节点称为链表的头结点也就是head。双链表单链表中的指针域只能指向节点的下一个节点。双链表:每一个节点有......
  • dp01
    摘花生题目描述她来到一片有网格状道路的矩形花生地(如下图),从西北角进去,东南角出来。地里每个道路的交叉点上都有种着一株花生苗,上面有若干颗花生,经过一株花生苗就能摘走该它上面所有的花生。H只能向东或向南走,不能向西或向北走。问H最多能够摘到多少颗花生。这是AcWing上的......
  • Hetao P1031 萌萌题 题解 [ 蓝 ] [ 线性 dp ]
    萌萌题:一道结合了观察性质的线性dp。观察我们先考虑极端情况:所有数相同,所有数降序排列两种情况。对于所有数相同的情况,我们发现,最终可以合并出来的区间,最多只有\(n\logn\)个。怎么证明?考虑固定右端点,那么我们想要合并出一个点,就得选\(2^k\)个数出来,这就有\(\logn\)......
  • 2018_11_02_04
    vue-cli案例constpath=require('path');functionresolve(dir){returnpath.join(__dirname,dir);}consttargetUrl='[地址]';module.exports={//Projectdeploymentbase//Bydefaultweassumeyourappwillbedeployedatthe......