.NET Framework详解:CLR、MSIL与互操作性

需积分: 10 4 下载量 110 浏览量 更新于2024-08-02 收藏 1.24MB PPT 举报
"这是关于.NET Framework的概述,涵盖了其结构、主要组件、编程语言支持、CLR、JIT编译、CTS、MSIL以及常用的命名空间。" .NET Framework是微软推出的一个全面的开发平台,用于构建、运行各种类型的软件应用。它为开发者提供了丰富的类库和一套统一的编程模型。该框架的核心组成部分包括公共语言运行时(CLR)和一套广泛的类库,这些类库支持多种编程语言,如C#、VB.NET、VC++ .Net等。 1. **公共语言运行时(CLR)**:CLR是.NET Framework的基础,它扮演着虚拟机的角色,负责程序的执行管理和资源管理。它提供垃圾回收、类型安全、异常处理、内存管理等功能,确保代码的可靠性和安全性。 2. **即时编译(JIT)**:当CLR遇到MSIL(Microsoft中间语言)代码时,JIT编译器会将其转换为机器码,以便于CPU直接执行。这一过程使得.NET应用具有较高的运行效率。 3. **通用类型系统(CTS)**:CTS定义了一套标准的数据类型,确保不同的.NET语言之间可以共享相同的类型定义,实现跨语言的互操作性。 4. **通用语言规范(CLS)**:CLS是一组规则,规定了.NET语言应该遵循的标准,以确保不同语言编写的组件可以无缝交互。遵循CLS的语言能保证兼容性,提升代码复用。 5. **中间语言(MSIL)**:所有.NET源代码都会被编译成MSIL,这是一种平台无关的指令集,能够在任何支持.NET Framework的平台上运行。MSIL在JIT编译时被转化为本地机器代码。 6. **命名空间**:命名空间是.NET Framework组织类和接口的一种方式,它们提供了逻辑分组,便于代码管理和重用。例如: - `System.Drawing`:提供用于图形处理和绘图的功能,包括图像绘制和打印支持。 - `System.Data`:包含与数据访问和管理相关的类,是ADO.NET技术的基础,用于连接和操作数据库。 - `System.IO`:处理文件和流的操作,如读写文件、内存流等。 - `System.XML`:支持XML文档的解析、操作和序列化,用于数据交换和存储。 通过.NET Framework,开发者可以利用强大的类库和工具,如Visual Studio .NET,快速高效地开发应用程序,无论是桌面应用、Web应用还是Web服务,都能享受到一致的开发体验和丰富的功能支持。

SELECT PIS.SHOW_FLT_DETAIL AS SHOW_FLT_DETAIL -- new , PIS.SHOW_AWB_DETAIL AS SHOW_AWB_DETAIL -- new , PIS.DISPLAY_AIRLINE_CODE AS CARRIER_CODE , DECODE(PIS.REVERT_FLOW,'N',PIS.FLOW_TYPE,DECODE(PIS.FLOW_TYPE,'I','E','I')) AS FLOW_TYPE , PIS.SHIP_TO_LOCATION AS SHIP_TO_LOCATION , PIS.INVOICE_SEQUENCE AS INVOICE_SEQUENCE , PFT.FLIGHT_DATE AS FLIGHT_DATE , PFT.FLIGHT_CARRIER_CODE AS FLIGHT_CARRIER_CODE , PFT.FLIGHT_SERIAL_NUMBER AS FLIGHT_SERIAL_NUMBER , PFT.FLOW_TYPE AS AIRCRAFT_FLOW , FAST.AIRCRAFT_SERVICE_TYPE AS AIRCRAFT_SERVICE_TYPE , PPT.AWB_NUMBER AS AWB_NUMBER , PPT.WEIGHT AS WEIGHT , PPT.CARGO_HANDLING_OPERATOR AS CARGO_HANDLING_OPERATOR , PPT.SHIPMENT_PACKING_TYPE AS SHIPMENT_PACKING_TYPE , PPT.SHIPMENT_FLOW_TYPE AS SHIPMENT_FLOW_TYPE , PPT.SHIPMENT_BUILD_TYPE AS SHIPMENT_BUILD_TYPE , PPT.SHIPMENT_CARGO_TYPE AS SHIPMENT_CARGO_TYPE , PPT.REVENUE_TYPE AS REVENUE_TYPE , PFT.JV_FLIGHT_CARRIER_CODE AS JV_FLIGHT_CARRIER_CODE , PPT.PORT_TONNAGE_UID AS PORT_TONNAGE_UID , PPT.AWB_UID AS AWB_UID , PIS.INVOICE_SEPARATION_UID AS INVOICE_SEPARATION_UID , PFT.FLIGHT_TONNAGE_UID AS FLIGHT_TONNAGE_UID FROM PN_FLT_TONNAGES PFT , FZ_AIRLINES FA , PN_TONNAGE_FLT_PORTS PTFP , PN_PORT_TONNAGES PPT , FF_AIRCRAFT_SERVICE_TYPES FAST , SR_PN_INVOICE_SEPARATIONS PIS --new , SR_PN_INVOICE_SEP_DETAILS PISD--new , SR_PN_INV_SEP_PORT_TONNAGES PISPT --new WHERE PFT.FLIGHT_OPERATION_DATE >= trunc( CASE :rundate WHEN TO_DATE('01/01/1900', 'DD/MM/YYYY') THEN ADD_MONTHS(SYSDATE,-1) ELSE ADD_MONTHS(:rundate,-1) END, 'MON') AND PFT.FLIGHT_OPERATION_DATE < trunc( CASE :rundate WHEN TO_DATE('01/01/1900', 'DD/MM/YYYY') THEN TRUNC(SYSDATE) ELSE TRUNC(:rundate) END, 'MON') AND PFT.TYPE IN ('C', 'F') AND PFT.RECORD_TYPE = 'M' AND (PFT.TERMINAL_OPERATOR NOT IN ('X', 'A') OR (PFT.TERMINAL_OPERATOR <> 'X' AND FA.CARRIER_CODE IN (SELECT * FROM SPECIAL_HANDLING_AIRLINE) AND PPT.REVENUE_TYPE IN (SELECT * FROM SPECIAL_REVENUE_TYPE) AND PPT.SHIPMENT_FLOW_TYPE IN (SELECT * FROM SPECIAL_SHIPMENT_FLOW_TYPE) AND PFT.FLIGHT_OPERATION_DATE >= (select EFF_DATE from SPECIAL_HANDLING_EFF_DATE) )) AND PFT.DELETING_DATETIME IS NULL AND FA.AIRLINE_UID = PFT.AIRLINE_UID AND FA.DELETING_DATETIME IS NULL AND PTFP.FLIGHT_TONNAGE_UID = PFT.FLIGHT_TONNAGE_UID AND PTFP.RECORD_TYPE = 'M' AND PTFP.DELETING_DATETIME IS NULL AND PPT.TONNAGE_FLIGHT_PORT_UID (+)= PTFP.TONNAGE_FLIGHT_PORT_UID AND PPT.RECORD_TYPE (+)= 'M' AND PPT.DISCREPANCY_TYPE (+)= 'NONE' AND PPT.ADJUSTMENT_INC_FLAG (+)= 'Y' AND PPT.DELETING_DATETIME (+) IS NULL AND FAST.AIRCRAFT_SERVICE_TYPE_UID = PFT.AIRCRAFT_SERVICE_TYPE_UID AND FAST.DELETING_DATETIME IS NULL AND PIS.TEMPORAL_NAME = TO_CHAR((CASE :rundate --new WHEN TO_DATE('01/01/1900', 'DD/MM/YYYY') THEN TRUNC(SYSDATE) ELSE TRUNC(:rundate) END ), 'YYYYMM') || '00' AND PIS.INVOICE_SEPARATION_UID = PISD.INVOICE_SEPARATION_UID --new AND PISD.INVOICE_SEP_DETAIL_UID = PISPT.INVOICE_SEP_DETAIL_UID --new AND PISPT.PORT_TONNAGE_UID = PPT.PORT_TONNAGE_UID --new AND PIS.PRINT_SUPPORTING_DOC = 'Y';上面是oracle的写法,请转成spark SQL的写法。

244 浏览量