Template:DeprecatedAPI/documentation: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '__NOTOC__<div style="background-color: #DBE9F4;"> ={{Font|Template Documentation|16|Calibri|bold|black}}= This is a boilerplate template for Synthesis API methods and proper…')
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:




This is a boilerplate template for Synthesis API methods and properties that have been deprecated (i.e., marked for removal in future versions of the API).
This boilerplate template is for use with deprecated Synthesis API methods. It inserts a text box that alerts the reader to the deprecated status of the call. (Deprecated means that the method call is marked for removal in future versions of the API.)  
 


==Usage==
==Usage==
This template has two parameters:
This template has 2 optional string parameters:
 
:1 = Allows you to indicate whether the deprecated call is a class or enumeration. The default value is "method."
:2 = Allows you to append additional text to the message in the text box.


:1 - Indicate whether it is a method or property.
For example, the following code shows how to use the 1st parameter:


:2 - Add the link to the new or recommended method/property to use instead.
<pre>
{{Template:DeprecatedAPI|class}}
</pre>


The code output is as follows:
{{Template:DeprecatedAPI|class}}


For example, the following code will generate a template for a deprecated ''method'' has been replaced with the ''Repository.Model.GetAllModels'' method:
 
The next example shows how to use the 2nd parameter:


<pre>
<pre>
{{Template:DeprecatedAPI|method|[[Repository.Model.GetAllModels]]}}
{{Template:DeprecatedAPI|2=Blah Blah Blah.}}
</pre>


</pre>
The code output is as follows:
{{Template:DeprecatedAPI|2=Blah Blah Blah.}}


The output appears as follows:


{{Template:DeprecatedAPI|method|[[Repository.Model.GetAllModels]]}}
==Related Templates==
[[Template:DeprecatedAPIpic]] - This template is for use with in-line text. It inserts a label that says "Deprecated".  





Latest revision as of 21:32, 30 March 2017


Template Documentation

This boilerplate template is for use with deprecated Synthesis API methods. It inserts a text box that alerts the reader to the deprecated status of the call. (Deprecated means that the method call is marked for removal in future versions of the API.)


Usage

This template has 2 optional string parameters:

1 = Allows you to indicate whether the deprecated call is a class or enumeration. The default value is "method."
2 = Allows you to append additional text to the message in the text box.

For example, the following code shows how to use the 1st parameter:

{{Template:DeprecatedAPI|class}}

The code output is as follows:

This class has been deprecated and may be removed in future versions of the Synthesis API. Do not use it in new applications.


The next example shows how to use the 2nd parameter:

{{Template:DeprecatedAPI|2=Blah Blah Blah.}}

The code output is as follows:

This method has been deprecated and may be removed in future versions of the Synthesis API. Do not use it in new applications. Blah Blah Blah.


Related Templates

Template:DeprecatedAPIpic - This template is for use with in-line text. It inserts a label that says "Deprecated".