| Java | .Net |
|---|---|
| java.util.Hashtable getRecognitionProperties() | System.Collections.Hashtable GetRecognitionProperties() |
| int getRecognitionPropertyWeight(String propertyName) | int GetRecognitionPropertyWeight(String propertyName) |
Il seguente esempio Java aggiunge una nuova proprietà, ".priorLabel", come un'ulteriore proprietà di riconoscimento.
import com.rational.test.ft.domain.*;
public class someProxy extends baseProxy
{
.
.
public java.util.Hashtable getRecognitionProperties()
{
java.util.Hashtable properties = super.getRecognitionProperties();
properties.put(".priorLabel", getPriorLabel());
return properties;
}
.
.
.
public Object getRecognitionPropertyWeight(String propertyName)
{
if (propertyName.equals(".priorLabel"))
return 60;
return super.getRecognitionPropertyWeight(propertyName);
}
}
Il seguente esempio .Net aggiunge una nuova proprietà, ".priorLabel", come un'ulteriore proprietà di riconoscimento.
using Rational.Test.Ft.Domain;
public class AnyProxy:BaseProxy
{
.
.
.
public override System.Collections.Hashtable GetRecognitionProperties()
{
System.Collections.Hashtable properties= base.GetRecognitionProperties();
properties.Add(".priorLabel", GetPriorLabel() );
return properties;
}
.
.
.
public override object GetRecognitionPropertyWeight(string propertyName)
{
if (propertyName == ".priorLabel" )
return 60;
return base.GetRecognitionPropertyWeight(propertyName) ;
}