CN107632934A - Function clone method and device in a kind of C sharp - Google Patents
Function clone method and device in a kind of C sharp Download PDFInfo
- Publication number
- CN107632934A CN107632934A CN201710841734.6A CN201710841734A CN107632934A CN 107632934 A CN107632934 A CN 107632934A CN 201710841734 A CN201710841734 A CN 201710841734A CN 107632934 A CN107632934 A CN 107632934A
- Authority
- CN
- China
- Prior art keywords
- function
- object function
- metadata
- methods
- described program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The present invention provides function clone method and device in a kind of C sharp, and methods described includes:S1, the procedure set of C sharp programs is obtained, if described program integrates as the procedure set where object function, the metadata of the object function is obtained according to described program collection;S2, using the metadata of the object function, create copy function;S3, the function body of the object function is obtained, the function body is set into the copy function of establishment.One aspect of the present invention, realize the object function of duplication in the original code for not influenceing object function during other code calls;On the other hand, copy function described in the present embodiment can directly invoke the next time after the completion of establishment.
Description
Technical field
The present invention relates to software test field, more particularly, to function clone method and device in a kind of C-sharp.
Background technology
In .net frameworks, the situation for needing operationally to create copy function is can be potentially encountered, such as replicates object function
Work probe program calls, without influenceing other programs.Probe detects the use of directory web site, CUP according to the target program of duplication
Situation, the operating system of server and component support situation etc..
At present, conventional way is directly invokes original function, but can only use in some circumstances.When directly invoking former letter
Number, when not being modified to original function, can use Normal practice;When needing to be modified original function, such as to original function
In variable when being modified, situation about being used can be changed before original function, the function modification before original function is out of order,
Destroy the packaging effects of original function.
The content of the invention
For overcome it is above-mentioned directly invoke original function when, in the case where being modified to original function, destroy original function encapsulation
The problem of property, solves the above problems at least in part, and the invention provides function clone method and dress in a kind of C-sharp
Put.
According to the first aspect of the invention, there is provided function clone method in a kind of C-sharp, including:
S1, the procedure set of C-sharp programs is obtained, if described program integrates as the procedure set where object function, basis
Described program collection obtains the metadata of the object function;
S2, using the metadata of the object function, create copy function;
S3, the function body of the object function is obtained, the function body is set into the copy function of establishment.
Specifically, the step S1 is specifically included:
CLR Profiler examples are created, the journey of the C-sharp programs is loaded in the CLR Profiler examples
Sequence collection;
In the ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, use
ICorProfilerInfo::GetModuleInfo methods obtain the title of described program collection;
If the title of procedure set, is obtained according to described program collection where the entitled object function of described program collection
The metadata of the object function.
Specifically, the step of obtaining the metadata of the object function in the step S1 specifically includes:
Use ICorProfilerInfo::GetModuleMetaData methods, obtain described program collection
IMetaDataImport interface instances;
IMetaDataImport is used in the IMetaDataImport interface instances::GetMethodProps side
Method obtains the metadata of the object function.
Specifically, the step S2 is specifically included:
In the ICorProfilerCallback::In the readjustment of ModuleLoadStarted methods, by the target
The metadata of function creates the copy function as the function declaration of the copy function.
Specifically, the step S3 is specifically included:
In ICorProfilerCallback::When JITCompilationStarted methods are adjusted back, use
ICorProfilerInfo::GetFunctionInfo methods obtain the function body of the object function;
The copy function of establishment is passed to ICorProfilerCallback::JITCompilationStarted side
Method;
The function body of the object function is set into the copy function.
Specifically, the function body of the object function is set to the step in the copy function and specifically included:
Using ImethodMalloc interfaces one piece of internal memory is distributed for the function body of the object function;
The function body of the object function is copied in the internal memory;
Use ICorProfilerInfo::Function body in the internal memory is set and arrived by SetILFunctionBody methods
In the copy function.
According to the second aspect of the invention, there is provided function reproducing unit in a kind of C-sharp, including:
Acquiring unit, for obtaining the procedure set of C-sharp programs, if described program integrates as the program where object function
Collection, then the metadata of the object function is obtained according to described program collection;
Creating unit, for the metadata using the object function, create copy function;
Setting unit, for obtaining the function body of the object function, the function body is set to what is created described multiple
In function processed.
Specifically, the acquiring unit is specifically used for:
CLR Profiler examples are created, the journey of the C-sharp programs is loaded in the CLR Profiler examples
Sequence collection;
In the ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, use
ICorProfilerInfo::GetModuleInfo methods obtain the title of described program collection;
If the title of procedure set, is obtained according to described program collection where the entitled object function of described program collection
The metadata of the object function.
According to the third aspect of the invention we, there is provided function copying equipment in a kind of C-sharp, including:
At least one processor, at least one memory and bus;Wherein,
The processor and memory complete mutual communication by the bus;
The memory storage has and by the programmed instruction of the computing device, the processor described program can be called to refer to
Order is able to carry out method as described before.
According to the fourth aspect of the invention, there is provided a kind of non-transient computer readable storage medium storing program for executing, for storing such as preceding institute
State the computer program of method.
The present invention provides function clone method and device in a kind of C-sharp, and this method is by obtaining in C-sharp programs
The metadata and function body of object function, use the copy function that function body is placed on to establishment after metadata establishment copy function
In, so as to complete the duplication of the object function, on the one hand, can be to the copy function when calling the copy function
Modify without the code for influenceing object function script, so as to remain the packaging effects of original code;On the other hand, the present embodiment
Described in copy function can directly invoke the next time after the completion of establishment.
Brief description of the drawings
Fig. 1 is function clone method overall flow schematic diagram in C-sharp provided in an embodiment of the present invention;
Fig. 2 is function reproducing unit overall structure diagram in C-sharp provided in an embodiment of the present invention;
Fig. 3 is function copying equipment overall structure diagram in C-sharp provided in an embodiment of the present invention.
Embodiment
With reference to the accompanying drawings and examples, the embodiment of the present invention is described in further detail.Implement below
Example is used to illustrate the present invention, but is not limited to the scope of the present invention.
Function clone method in a kind of C-sharp is provided in one embodiment of the invention, and Fig. 1 is the embodiment of the present invention
Function clone method overall flow schematic diagram, this method include in the C-sharp of offer:S1, obtain the program of C-sharp programs
Collection, if described program integrates as the procedure set where object function, first number of the object function is obtained according to described program collection
According to;S2, using the metadata of the object function, create copy function;S3, the function body of the object function is obtained, by institute
Function body is stated to set into the copy function of establishment.
Specifically, in S1, C-sharp, also referred to as C#, be Microsoft issue it is a kind of object-oriented, run on
.NET the high-level programming language on Framework.C-sharp programs are the program write using C-sharp language.
Described program collection is one or more trustship modules, and the logical combination of some resource files, is to supply CLR (Common
LanguageRuntime, CLR) intermediate product that further performs .dll is generally in Windows systems
Or .exe forms.The function that the object function replicates for needs.The metadata is also known as broker data or relaying data, to retouch
The data of data are stated, are mainly used in describing the attribute information of data, such as storage location, historical data and file record.Judge
Whether described program collection is procedure set where the object function.Integrate if judged result is described program where object function
Procedure set, then the metadata of the object function is obtained according to described program collection.In S2, first number of the object function is used
According to the copy function is created, i.e., using one function of metadata definition of the object function, using the function of definition as multiple
The statement of function processed, wherein metadata equivalent to the copy function.In S3, the function body of the object function is obtained, it is described
Function body is the specific implementation of the object function, and the function body and the metadata, which are combined, represents the object function
Complete realization.The function body is set into the copy function of establishment, so as to complete the duplication of object function.This
Embodiment refers to what is completed on the basis of CLRProfiler, and CLR Profiler are the bottoms for the .net frameworks that Windows is provided
Instrument, the various API in CLR Profiler can operationally change program code, the shape during whole service of monitoring programme
State.
The present embodiment is created by obtaining the metadata and function body of object function in C-sharp programs using metadata
Function body is placed in the copy function of establishment after copy function, so as to complete the duplication of the object function, on the one hand,
When calling the copy function, the copy function can be modified without the code for influenceing object function script, so as to
Remain the packaging effects of original code;On the other hand, next time can be direct after the completion of establishment for copy function described in the present embodiment
Call.
On the basis of above-described embodiment, step S1 described in the present embodiment specifically includes:It is real to create CLR Profiler
Example, the procedure set of the C-sharp programs is loaded in the CLR Profiler examples;Described
ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, ICorProfilerInfo is used::
GetModuleInfo methods obtain the title of described program collection;If journey where the entitled object function of described program collection
The title of sequence collection, then the metadata of the object function is obtained according to described program collection.
Specifically, CLR Profiler examples are created, CLR Profiler include the non-managed of .net frameworks offer
API, such as IcorProfilerCallback, ICorProfilerInfo.Institute is loaded in the CLR Profiler examples
State the procedure set of C-sharp programs.In ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, sentence
Whether disconnected described program collection is procedure set where the object function.Wherein, ICorProfilerCallback interfaces provide
Common language runtime (CLR, Common Language Runtime) information code when code profiler is started working is analyzed
The method of device.ModuleLoadStarted methods in ICorProfilerCallback interfaces, which are used for notification analysis device, mould
Block will be loaded.Specifically, judge whether described program collection is the target by obtaining the method for procedure set module titles
Procedure set where function.Use ICorProfilerInfo::GetModuleInfo methods obtain the title of described program collection.
Wherein, ICorProfilerInfo interfaces provide code profiler and the method to be communicated between the common language runtime, with
The monitoring of control event and solicited message.GetModuleInfo methods in ICorProfilerInfo interfaces are receiving mould
During block number, the filename of module and the ID of module father node are returned.If the entitled object function institute of described program collection
In the title of procedure set, then the metadata of the object function is obtained according to described program collection.
On the basis of the various embodiments described above, the metadata of the object function is obtained in step S1 described in the present embodiment
The step of specifically include:Use ICorProfilerInfo::GetModuleMetaData methods, obtain described program collection
IMetaDataImport interface instances;IMetaDataImport is used in the IMetaDataImport interface instances::
GetMethodProps methods obtain the metadata of the object function.
Specifically, using ICorProfilerInfo::GetModuleMetaData methods, obtain described program collection
IMetaDataImport interface instances.ICorProfilerInfo::GetModuleMetaData methods can be used for directly repairing
Change the described program collection being currently loaded.Wherein, the GetModuleMetaData methods in ICorProfilerInfo interfaces are used for
Obtain the metadata interface example for being mapped to particular module.Used in the IMetaDataImport interface instances
IMetaDataImport::GetMethodProps methods obtain the metadata of the object function, and the metadata includes mesh
Function signature of scalar functions etc..The IMetaDataImport interfaces provide the method for importing and operating existing metadata, described
Existing metadata is from transportable executable file or elsewhere, and metadata two is entered during such as typelib or independent operation
File processed.GetMethodProps methods in the IMetaDataImport interfaces obtain and appointed function mark institute
The associated metadata of the method for reference.
On the basis of the various embodiments described above, step S2 described in the present embodiment specifically includes:Described
ICorProfilerCallback::In the readjustment of ModuleLoadStarted methods, the metadata of the object function is made
The copy function is created for the function declaration of the copy function.
On the basis of the various embodiments described above, step S3 described in the present embodiment specifically includes:
ICorProfilerCallback::When JITCompilationStarted methods are adjusted back, ICorProfilerInfo is used::
GetFunctionInfo methods obtain the function body of the object function;The copy function of establishment is passed to
ICorProfilerCallback::JITCompilationStarted methods;The function body of the object function is set and arrived
In the copy function.
Specifically, in ICorProfilerCallback::When JITCompilationStarted methods are adjusted back, pass through
IcorProfilerInfo obtains the function body of the object function.Wherein, in IcorProfilerCallback interfaces
JITCompilationStarted methods are used for notification analysis device JIT (just-in-time, in real time) compiler and start to compile letter
Number.GetFunctionInfo methods in IcorProfilerInfo interfaces are used for the parent and metadata for obtaining specified function.
Specifically, directly using ICorProfilerInfo::GetFunctionInfo methods can obtain the letter of the object function
Number body.The copy function of establishment is passed to ICorProfilerCallback::JITCompilationStarted methods,
In ICorProfilerCallback::When JITCompilationStarted methods are adjusted back, by the function of the object function
Body is set into the copy function.The whole process for creating copy function is completed.
The function body of the object function is set on the basis of above-described embodiment, in the present embodiment and arrives the duplication letter
Step in number specifically includes:Using ImethodMalloc interfaces one piece of internal memory is distributed for the function body of the object function;Will
The function body of the object function is copied in the internal memory;Use ICorProfilerInfo::SetILFunctionBody
Method sets the function body in the internal memory into the copy function.
Specifically, one piece of internal memory is distributed for the function body of the object function using ImethodMalloc interfaces, it is described interior
The size deposited is the size of the function body.ImethodMalloc interfaces are provided as new MSIL (Microsoft
Intermediate Language, Microsoft intermediate language) function body storage allocation method.By the object function
Function body is copied in the internal memory, uses ICorProfilerInfo::SetILFunctionBody methods are by the internal memory
In function body set into the copy function of establishment.Wherein, in ICorProfilerInfo interfaces
SetILFunctionBody methods are used for the function body for replacing specified function in designated module.
Function reproducing unit in a kind of C-sharp is provided in another embodiment of the present invention, and Fig. 2 is implemented for the present invention
Function reproducing unit overall structure diagram in the C-sharp that example provides, the device include acquiring unit 1, creating unit 2 and set
Unit 3 is put, wherein:
The acquiring unit 1 is used for the procedure set for obtaining C-sharp programs, if described program integrates as where object function
Procedure set, then the metadata of the object function is obtained according to described program collection;The creating unit 2 is used to use the target
The metadata of function, create copy function;The setting unit 3 is used for the function body for obtaining the object function, by the letter
Number body is set into the copy function of establishment.
Specifically, C-sharp, also referred to as C#, be Microsoft issue it is a kind of object-oriented, run on .NET
High-level programming language on Framework.C-sharp programs are the program write using C-sharp language.The journey
Sequence collection is one or more trustship modules, and the logical combination of some resource files, is to supply CLR (Common Language
Runtime, CLR) intermediate product that further performs .dll or .exe lattice are generally in Windows systems
Formula.The function that the object function replicates for needs.The metadata is also known as broker data or relaying data, for description data
Data, it is mainly used in describing the attribute information of data, such as storage location, historical data and file record.The acquiring unit 1
Judge whether described program collection is procedure set where the object function.Integrate if judged result is described program as object function
The procedure set at place, then the metadata of the object function is obtained according to described program collection.The creating unit 2 uses the mesh
The metadata of scalar functions creates the copy function, i.e., using one function of metadata definition of the object function, will define
Function as copy function, wherein statement of the metadata equivalent to the copy function.The setting unit 3 obtains the mesh
The function body of scalar functions, the function body are the specific implementation of the object function, and the function body and the metadata are closed
The complete realization of the object function is represented together.The function body is set into the copy function of establishment, so as to complete
Into the duplication of object function.The present embodiment refers to what is completed on the basis of CLR Profiler, and CLR Profiler are
The bottom instrument for the .net frameworks that Windows is provided, the various API in CLR Profiler can be changed operationally program generation
Code, the state during whole service of monitoring programme.
The present embodiment is created by obtaining the metadata and function body of object function in C-sharp programs using metadata
Function body is placed in the copy function of establishment after copy function, so as to complete the duplication of the object function, on the one hand,
When calling the copy function, the copy function can be modified without the code for influenceing object function script, so as to
Remain the packaging effects of original code;On the other hand, next time can be direct after the completion of establishment for copy function described in the present embodiment
Call.
On the basis of above-described embodiment, acquiring unit is specifically used for described in the present embodiment:Create CLR Profiler
Example, load the procedure set of the C-sharp programs;In the ICorProfilerCallback::
When ModuleLoadStarted methods are adjusted back, ICorProfilerInfo is used::GetModuleInfo methods obtain the journey
The title of sequence collection;If the title of procedure set where the entitled object function of described program collection, according to described program collection
Obtain the metadata of the object function.
Specifically, the acquiring unit creates CLR Profiler examples, and CLR Profiler include .net frameworks and carried
The non-managed API of confession, such as IcorProfilerCallback, ICorProfilerInfo.Described in the acquiring unit loading
The procedure set of C-sharp programs.In ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, judge
Whether described program collection is procedure set where the object function.Specifically, the acquiring unit is by obtaining procedure set
The method of module titles judges whether described program collection is procedure set where the object function.Use
ICorProfilerInfo::GetModuleInfo methods obtain the title of described program collection.If described program collection is entitled
The title of procedure set where the object function, then the metadata of the object function is obtained according to described program collection.
On the basis of the various embodiments described above, acquiring unit is further specifically used for described in the present embodiment:Use
ICorProfilerInfo::GetModuleMetaData methods, the IMetaDataImport methods for obtaining described program collection are real
Example;IMetaDataImport is used in the IMetaDataImport methods example::GetMethodProps methods obtain
The metadata of the object function.
On the basis of the various embodiments described above, creating unit is specifically used for described in the present embodiment:Described
ICorProfilerCallback::In the readjustment of ModuleLoadStarted methods, the metadata of the object function is made
The copy function is created for the function declaration of the copy function.
On the basis of the various embodiments described above, setting unit is specifically used for described in the present embodiment:
ICorProfilerCallback::When JITCompilationStarted methods are adjusted back, ICorProfilerInfo is used::
GetFunctionInfo methods obtain the function body of the object function;The copy function of establishment is passed to
ICorProfilerCallback::JITCompilationStarted methods;The function body of the object function is set and arrived
In the copy function.
On the basis of above-described embodiment, setting unit is further specifically used for described in the present embodiment:Use
ImethodMalloc interfaces distribute one piece of internal memory for the function body of the object function;The function body of the object function is answered
Make in the internal memory;Use ICorProfilerInfo::SetILFunctionBody methods are by the function in the internal memory
Body is set into the copy function.
The present embodiment provides function copying equipment in a kind of C-sharp, and Fig. 3 is C-sharp provided in an embodiment of the present invention
Middle function copying equipment overall structure diagram, the equipment include:At least one processor 31, at least one memory 32 and total
Line 33;Wherein,
The processor 31 and memory 32 complete mutual communication by the bus 33;
The memory 32 is stored with the programmed instruction that can be performed by the processor 31, and the processor calls the journey
Sequence instruction is able to carry out the method that above-mentioned each method embodiment is provided, such as including:S1, obtain the program of C-sharp programs
Collection, if described program integrates as the procedure set where object function, first number of the object function is obtained according to described program collection
According to;S2, using the metadata of the object function, create copy function;S3, the function body of the object function is obtained, by institute
Function body is stated to set into the copy function of establishment.
The present embodiment provides a kind of non-transient computer readable storage medium storing program for executing, the non-transient computer readable storage medium storing program for executing
Computer instruction is stored, the computer instruction makes the computer perform the method that above-mentioned each method embodiment is provided, example
Such as include:S1, the procedure set of C-sharp programs is obtained, if described program integrates as the procedure set where object function, according to institute
State the metadata that procedure set obtains the object function;S2, using the metadata of the object function, create copy function;S3,
The function body of the object function is obtained, the function body is set into the copy function of establishment.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program
Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
Function copying equipment embodiment is only schematical in C-sharp described above, wherein described be used as is divided
Unit from part description can be or may not be it is physically separate, can be as the part that unit is shown or
It may not be physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can basis
It is actual to need to select some or all of module therein to realize the purpose of this embodiment scheme.Ordinary skill people
Member is not in the case where paying performing creative labour, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on
The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should
Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers
Make to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation
Method described in some parts of example or embodiment.
Finally, the present processes are only preferable embodiment, are not intended to limit the scope of the present invention.It is all
Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc., the protection of the present invention should be included in
Within the scope of.
Claims (10)
- A kind of 1. function clone method in C-sharp, it is characterised in that including:S1, the procedure set of C-sharp programs is obtained, if described program integrates as the procedure set where object function, according to Procedure set obtains the metadata of the object function;S2, using the metadata of the object function, create copy function;S3, the function body of the object function is obtained, the function body is set into the copy function of establishment.
- 2. according to the method for claim 1, it is characterised in that the step S1 is specifically included:CLR Profiler examples are created, the procedure set of the C-sharp programs is loaded in the CLR Profiler examples;In the ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, use ICorProfilerInfo::GetModuleInfo methods obtain the title of described program collection;If the title of procedure set where the entitled object function of described program collection, according to obtaining described program collection The metadata of object function.
- 3. method according to claim 1 or 2, it is characterised in that the member of the object function is obtained in the step S1 The step of data, specifically includes:Use ICorProfilerInfo::GetModuleMetaData methods, obtain described program collection ImetaDataImport interface instances;IMetaDataImport is used in the ImetaDataImport interface instances::GetMethodProps methods obtain Take the metadata of the object function.
- 4. method according to claim 1 or 2, it is characterised in that the step S2 is specifically included:In the ICorProfilerCallback::In the readjustment of ModuleLoadStarted methods, by the object function Metadata create the copy function as the function declaration of the copy function.
- 5. method according to claim 1 or 2, it is characterised in that the step S3 is specifically included:In ICorProfilerCallback::When JITCompilationStarted methods are adjusted back, use ICorProfilerInfo::GetFunctionInfo methods obtain the function body of the object function;The copy function of establishment is passed to ICorProfilerCallback::JITCompilationStarted methods;The function body of the object function is set into the copy function.
- 6. according to the method for claim 5, it is characterised in that the function body of the object function is set and arrives the duplication Step in function specifically includes:Using ImethodMalloc interfaces one piece of internal memory is distributed for the function body of the object function;The function body of the object function is copied in the internal memory;Use ICorProfilerInfo::SetILFunctionBody methods set the function body in the internal memory to described In copy function.
- A kind of 7. function reproducing unit in C-sharp, it is characterised in that including:Acquiring unit, for obtaining the procedure set of C-sharp programs, if described program integrates as the procedure set where object function, The metadata of the object function is then obtained according to described program collection;Creating unit, for the metadata using the object function, create copy function;Setting unit, for obtaining the function body of the object function, the function body is set to the duplication letter created In number.
- 8. device according to claim 7, it is characterised in that the acquiring unit is specifically used for:CLR Profiler examples are created, the procedure set of the C-sharp programs is loaded in the CLR Profiler examples;In the ICorProfilerCallback::When ModuleLoadStarted methods are adjusted back, use ICorProfilerInfo::GetModuleInfo methods obtain the title of described program collection;If the title of procedure set where the entitled object function of described program collection, according to obtaining described program collection The metadata of object function.
- A kind of 9. function copying equipment in C-sharp, it is characterised in that including:At least one processor, at least one memory and bus;Wherein,The processor and memory complete mutual communication by the bus;The memory storage has can be by the programmed instruction of the computing device, and the processor calls described program instruction energy Enough perform the method as described in claim 1 to 6 is any.
- 10. a kind of non-transient computer readable storage medium storing program for executing, it is characterised in that the non-transient computer readable storage medium storing program for executing is deposited Computer instruction is stored up, the computer instruction makes the computer perform the method as described in claim 1 to 6 is any.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710841734.6A CN107632934B (en) | 2017-09-18 | 2017-09-18 | Function copying method and device in C-sharp |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710841734.6A CN107632934B (en) | 2017-09-18 | 2017-09-18 | Function copying method and device in C-sharp |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107632934A true CN107632934A (en) | 2018-01-26 |
CN107632934B CN107632934B (en) | 2021-02-02 |
Family
ID=61101952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710841734.6A Active CN107632934B (en) | 2017-09-18 | 2017-09-18 | Function copying method and device in C-sharp |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107632934B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101719077A (en) * | 2009-12-24 | 2010-06-02 | 北京飞天诚信科技有限公司 | Method and device for injecting codes in .Net program |
CN102207903A (en) * | 2010-03-29 | 2011-10-05 | 微软公司 | Automatically redirecting method calls for unit testing |
US8176480B1 (en) * | 2006-02-27 | 2012-05-08 | Symantec Operating Corporation | Adaptive instrumentation through dynamic recompilation |
US9645912B2 (en) * | 2008-12-01 | 2017-05-09 | Microsoft Technology Licensing, Llc | In-place function modification |
-
2017
- 2017-09-18 CN CN201710841734.6A patent/CN107632934B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8176480B1 (en) * | 2006-02-27 | 2012-05-08 | Symantec Operating Corporation | Adaptive instrumentation through dynamic recompilation |
US9645912B2 (en) * | 2008-12-01 | 2017-05-09 | Microsoft Technology Licensing, Llc | In-place function modification |
CN101719077A (en) * | 2009-12-24 | 2010-06-02 | 北京飞天诚信科技有限公司 | Method and device for injecting codes in .Net program |
CN102207903A (en) * | 2010-03-29 | 2011-10-05 | 微软公司 | Automatically redirecting method calls for unit testing |
Non-Patent Citations (1)
Title |
---|
WALLA: "Modifying IL at runtime (step II)", 《HTTPS://WWW.XUEBUYUAN.COM/121074.HTML》 * |
Also Published As
Publication number | Publication date |
---|---|
CN107632934B (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9021419B2 (en) | System and method for supporting intelligent design pattern automation | |
US9971672B2 (en) | Using emulation to disassociate verification from stimulus in functional test | |
GB2508643A (en) | Method for Performing a Regression Test after Modifying Source Code File | |
US10732934B2 (en) | Information-technology workflows using executable tiles | |
WO2008099215A1 (en) | Improvements in or relating to component-based development | |
CN102591777A (en) | Unit test code generation method and device | |
US9454360B2 (en) | Characterizing interface evolution and consumer roles in module systems | |
Zheng et al. | Enhancing architecture-implementation conformance with change management and support for behavioral mapping | |
CN105022630A (en) | Component management system and component management method | |
CN101430644A (en) | System and method of executing a dynamic program in a structured environment | |
WO2003001373A1 (en) | Java rule engine framework | |
CN112148278A (en) | Visual block chain intelligent contract framework and intelligent contract development and deployment method | |
CN109032631A (en) | Application program service packs acquisition methods, device, computer equipment and storage medium | |
CN104503778A (en) | Installation method and installation device for applications | |
Pickin et al. | System test synthesis from UML models of distributed software | |
CN111880804A (en) | Application program code processing method and device | |
KR100994070B1 (en) | A Reserved Component Container Based Software Development Method and Apparatus | |
US10732947B2 (en) | Information-technology workflow using tiles that declaratively specify datatypes | |
CN107632934A (en) | Function clone method and device in a kind of C sharp | |
CN109298883A (en) | A kind of automatically generate component file method and electronic equipment under teaching platform | |
US10657476B2 (en) | Just in time compilation (JIT) for business process execution | |
CN107656738A (en) | Model structural design method and device in a kind of Android | |
Amoui et al. | Software evolution towards model-centric runtime adaptivity | |
Şavga et al. | Practical refactoring-based framework upgrade | |
Gregersen et al. | Javeleon: An integrated platform for dynamic software updating and its application in self-* systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |