本文整理汇总了C#中com类的典型用法代码示例。如果您正苦于以下问题:C# com类的具体用法?C# com怎么用?C# com使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
com类属于命名空间,在下文中一共展示了com类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: areIntersecting
public static bool areIntersecting(com.brashmonkey.spriter.SpriterRectangle rect1
, com.brashmonkey.spriter.SpriterRectangle rect2)
{
return rect1.isInisde(rect2.left, rect2.top) || rect1.isInisde(rect2.right, rect2
.top) || rect1.isInisde(rect2.left, rect2.bottom) || rect1.isInisde(rect2.right,
rect2.bottom);
}
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:7,代码来源:SpriterRectangle.cs
示例2: JsonReadContext
public JsonReadContext(com.fasterxml.jackson.core.json.JsonReadContext parent, com.fasterxml.jackson.core.json.DupDetector
dups, int type, int lineNr, int colNr)
: base()
{
// // // Configuration
// // // Optional duplicate detection
/*
/**********************************************************
/* Simple instance reuse slots; speeds up things
/* a bit (10-15%) for docs with lots of small
/* arrays/objects (for which allocation was
/* visible in profile stack frames)
/**********************************************************
*/
/*
/**********************************************************
/* Location/state information (minus source reference)
/**********************************************************
*/
/*
/**********************************************************
/* Instance construction, config, reuse
/**********************************************************
*/
_parent = parent;
_dups = dups;
_type = type;
_lineNr = lineNr;
_columnNr = colNr;
_index = -1;
}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:31,代码来源:JsonReadContext.cs
示例3: ExportExWorkCalendar
public ActionResult ExportExWorkCalendar(string dateIndexTo, string dateIndex, DateTime? dateIndexDate,
DateTime? dateIndexToDate, string productLine, com.Sconit.CodeMaster.TimeUnit dateType )
{
com.Sconit.CodeMaster.ResourceGroup resourceGroup = com.Sconit.CodeMaster.ResourceGroup.EX;
var table = _GetMrpWorkingCalendarView(dateIndexTo, dateIndex, dateIndexDate, dateIndexToDate, productLine, dateType, resourceGroup);
return new DownloadFileActionResult(table, "ExWorkCalendar.xls");
}
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:7,代码来源:WorkCalendarController.cs
示例4: JsonWriteContext
protected internal JsonWriteContext(int type, com.fasterxml.jackson.core.json.JsonWriteContext
parent, com.fasterxml.jackson.core.json.DupDetector dups)
: base()
{
// // // Return values for writeValue()
// in root context
// // // Optional duplicate detection
/*
/**********************************************************
/* Simple instance reuse slots; speed up things
/* a bit (10-15%) for docs with lots of small
/* arrays/objects
/**********************************************************
*/
/*
/**********************************************************
/* Location/state information (minus source reference)
/**********************************************************
*/
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
_type = type;
_parent = parent;
_dups = dups;
_index = -1;
}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:29,代码来源:JsonWriteContext.cs
示例5: TokenFilterContext
protected internal TokenFilterContext(int type, com.fasterxml.jackson.core.filter.TokenFilterContext
parent, com.fasterxml.jackson.core.filter.TokenFilter filter, bool startHandled
)
: base()
{
/*
/**********************************************************
/* Simple instance reuse slots; speed up things
/* a bit (10-15%) for docs with lots of small
/* arrays/objects
/**********************************************************
*/
/*
/**********************************************************
/* Location/state information
/**********************************************************
*/
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
_type = type;
_parent = parent;
_filter = filter;
_index = -1;
_startHandled = startHandled;
_needToHandleName = false;
}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:29,代码来源:TokenFilterContext.cs
示例6: Run
public override long Run(com.android.vending.billing.IMarketBillingService service)
{
Bundle request = makeRequestBundle("REQUEST_PURCHASE");
request.PutString(Consts.BILLING_REQUEST_ITEM_ID, mProductId);
request.PutString(Consts.BILLING_REQUEST_ITEM_TYPE, mProductType);
// Note that the developer payload is optional.
if (mDeveloperPayload != null) {
request.PutString(Consts.BILLING_REQUEST_DEVELOPER_PAYLOAD, mDeveloperPayload);
}
Bundle response = service.SendBillingRequest(request);
PendingIntent pendingIntent
= response.GetParcelable(Consts.BILLING_RESPONSE_PURCHASE_INTENT) as PendingIntent;
if (pendingIntent == null)
{
Log.Error("BillingService", "Error with requestPurchase");
return Consts.BILLING_RESPONSE_INVALID_REQUEST_ID;
}
Intent intent = new Intent();
ResponseHandler.buyPageIntentResponse(pendingIntent, intent);
return response.GetLong(Consts.BILLING_RESPONSE_REQUEST_ID,
Consts.BILLING_RESPONSE_INVALID_REQUEST_ID);
}
开发者ID:ddebilt,项目名称:play.billing,代码行数:26,代码来源:RequestPurchase.cs
示例7: configureDiagnosticGroups
/// <summary>
/// Convert jsCompiler options to Google Closure Compiler options.
/// </summary>
/// <param name="options1"></param>
/// <param name="options2"></param>
private void configureDiagnosticGroups(jsCompiler.Core.CompilerOptions options1, com.google.javascript.jscomp.CompilerOptions options2)
{
// Set the compiler checks below tight...
/*
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.MISSING_PROPERTIES, com.google.javascript.jscomp.CheckLevel.ERROR);
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNDEFINED_VARIABLES, com.google.javascript.jscomp.CheckLevel.ERROR);
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_TYPES, com.google.javascript.jscomp.CheckLevel.ERROR);
*/
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.ACCESS_CONTROLS, getCheckLevel(options1.DiagnosticGroup.AccessControl));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.AMBIGUOUS_FUNCTION_DECL, getCheckLevel(options1.DiagnosticGroup.AmbiguousFunctionDeclaration));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_REGEXP, getCheckLevel(options1.DiagnosticGroup.CheckRegularExpression));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_TYPES, getCheckLevel(options1.DiagnosticGroup.CheckTypes));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_USELESS_CODE, getCheckLevel(options1.DiagnosticGroup.UselessCode));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_VARIABLES, getCheckLevel(options1.DiagnosticGroup.CheckVariables));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CONSTANT_PROPERTY, getCheckLevel(options1.DiagnosticGroup.ConstantProperty));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.DEPRECATED, getCheckLevel(options1.DiagnosticGroup.Deprecated));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.DUPLICATE_MESSAGE, getCheckLevel(options1.DiagnosticGroup.DuplicateMessage));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.ES5_STRICT, getCheckLevel(options1.DiagnosticGroup.ES5Strict));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.EXTERNS_VALIDATION, getCheckLevel(options1.DiagnosticGroup.ExternsValidation));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.FILEOVERVIEW_JSDOC, getCheckLevel(options1.DiagnosticGroup.FileOverviewTags));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.GLOBAL_THIS, getCheckLevel(options1.DiagnosticGroup.GlobalThis));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.INTERNET_EXPLORER_CHECKS, getCheckLevel(options1.DiagnosticGroup.InternetExplorerChecks));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.INVALID_CASTS, getCheckLevel(options1.DiagnosticGroup.InvalidCasts));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.MISSING_PROPERTIES, getCheckLevel(options1.DiagnosticGroup.MissingProperties));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.NON_STANDARD_JSDOC, getCheckLevel(options1.DiagnosticGroup.NonStandard_JSDoc));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.STRICT_MODULE_DEP_CHECK, getCheckLevel(options1.DiagnosticGroup.StrictModuleDependencyCheck));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.TYPE_INVALIDATION, getCheckLevel(options1.DiagnosticGroup.TypeInvalidation));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNDEFINED_NAMES, getCheckLevel(options1.DiagnosticGroup.UndefinedNames));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNDEFINED_VARIABLES, getCheckLevel(options1.DiagnosticGroup.UndefinedVariables));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNKNOWN_DEFINES, getCheckLevel(options1.DiagnosticGroup.UnknownDefines));
options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.VISIBILITY, getCheckLevel(options1.DiagnosticGroup.Visibility));
}
开发者ID:MiguelCastillo,项目名称:jsCompiler,代码行数:38,代码来源:JNICompilerOptions.cs
示例8: JsonGeneratorImpl
public JsonGeneratorImpl(com.fasterxml.jackson.core.io.IOContext ctxt, int features
, com.fasterxml.jackson.core.ObjectCodec codec)
: base(features, codec)
{
/*
/**********************************************************
/* Constants
/**********************************************************
*/
/*
/**********************************************************
/* Configuration, basic I/O
/**********************************************************
*/
/*
/**********************************************************
/* Configuration, output escaping
/**********************************************************
*/
/*
/**********************************************************
/* Configuration, other
/**********************************************************
*/
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
_ioContext = ctxt;
if (isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature.ESCAPE_NON_ASCII))
{
setHighestNonEscapedChar(127);
}
}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:35,代码来源:JsonGeneratorImpl.cs
示例9: GeneratorBase
protected internal GeneratorBase(int features, com.fasterxml.jackson.core.ObjectCodec
codec)
: base()
{
// // // Constants for validation messages (since 2.6)
/*
/**********************************************************
/* Configuration
/**********************************************************
*/
/*
/**********************************************************
/* State
/**********************************************************
*/
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
_features = features;
_objectCodec = codec;
com.fasterxml.jackson.core.json.DupDetector dups = com.fasterxml.jackson.core.JsonGenerator.Feature
.STRICT_DUPLICATE_DETECTION.enabledIn(features) ? com.fasterxml.jackson.core.json.DupDetector
.rootDetector(this) : null;
_writeContext = com.fasterxml.jackson.core.json.JsonWriteContext.createRootContext
(dups);
_cfgNumbersAsStrings = com.fasterxml.jackson.core.JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS
.enabledIn(features);
}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:30,代码来源:GeneratorBase.cs
示例10: configureCompileLevel
/// <summary>
/// Internal translation for compiler level between exposed setting in C# and java
/// </summary>
/// <param name="options1"></param>
/// <param name="options2"></param>
private void configureCompileLevel(jsCompiler.Core.CompilerOptions options1, com.google.javascript.jscomp.CompilerOptions options2)
{
switch (options1.CompilerLevel)
{
case jsCompiler.Core.CompilerOptions.ECompilerLevel.WhiteSpaceOnly:
{
com.google.javascript.jscomp.CompilationLevel.WHITESPACE_ONLY.setOptionsForCompilationLevel(options2);
break;
}
case jsCompiler.Core.CompilerOptions.ECompilerLevel.SimpleOptimization:
{
com.google.javascript.jscomp.CompilationLevel.SIMPLE_OPTIMIZATIONS.setOptionsForCompilationLevel(options2);
break;
}
case jsCompiler.Core.CompilerOptions.ECompilerLevel.AdvancedOptimization:
{
com.google.javascript.jscomp.CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options2);
break;
}
default:
{
break;
}
}
}
开发者ID:MiguelCastillo,项目名称:jsCompiler,代码行数:30,代码来源:JNICompilerOptions.cs
示例11: onDeleteRoomDone
public void onDeleteRoomDone(com.shephertz.app42.gaming.multiplayer.client.events.RoomEvent roomEventObj)
{
if (roomEventObj.getData() != null)
{
Debug.WriteLine("onDeleteRoom " + roomEventObj.getData().getId() + " " + roomEventObj.getResult());
}
}
开发者ID:rahulpshephertz,项目名称:QuizUp-AppWarpS2,代码行数:7,代码来源:ZoneRequestListener.cs
示例12: createFlattened
/// <summary>
/// Method that will construct a parser (possibly a sequence) that
/// contains all given sub-parsers.
/// </summary>
/// <remarks>
/// Method that will construct a parser (possibly a sequence) that
/// contains all given sub-parsers.
/// All parsers given are checked to see if they are sequences: and
/// if so, they will be "flattened", that is, contained parsers are
/// directly added in a new sequence instead of adding sequences
/// within sequences. This is done to minimize delegation depth,
/// ideally only having just a single level of delegation.
/// </remarks>
public static com.fasterxml.jackson.core.util.JsonParserSequence createFlattened(
com.fasterxml.jackson.core.JsonParser first, com.fasterxml.jackson.core.JsonParser
second)
{
if (!(first is com.fasterxml.jackson.core.util.JsonParserSequence || second is com.fasterxml.jackson.core.util.JsonParserSequence
))
{
// simple:
return new com.fasterxml.jackson.core.util.JsonParserSequence(new com.fasterxml.jackson.core.JsonParser
[] { first, second });
}
Sharpen.AList<com.fasterxml.jackson.core.JsonParser> p = new Sharpen.AList<com.fasterxml.jackson.core.JsonParser
>();
if (first is com.fasterxml.jackson.core.util.JsonParserSequence)
{
((com.fasterxml.jackson.core.util.JsonParserSequence)first).addFlattenedActiveParsers
(p);
}
else
{
p.Add(first);
}
if (second is com.fasterxml.jackson.core.util.JsonParserSequence)
{
((com.fasterxml.jackson.core.util.JsonParserSequence)second).addFlattenedActiveParsers
(p);
}
else
{
p.Add(second);
}
return new com.fasterxml.jackson.core.util.JsonParserSequence(Sharpen.Collections.ToArray
(p, new com.fasterxml.jackson.core.JsonParser[p.Count]));
}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:47,代码来源:JsonParserSequence.cs
示例13: Spriter
public Spriter(com.discobeard.spriter.dom.SpriterData spriterData, com.brashmonkey.spriter.file.FileLoader loader, java.io.File scmlFile)
{
this.scmlFile = scmlFile;
this.spriterData = spriterData;
this.loader = loader;
this.loadResources();
}
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:7,代码来源:Spriter.cs
示例14: draw
/// <summary>Draws the given player with its sprites.</summary>
/// <remarks>Draws the given player with its sprites.</remarks>
/// <param name="player">Player to draw.</param>
public virtual void draw(com.brashmonkey.spriter.player.SpriterAbstractPlayer player
)
{
com.brashmonkey.spriter.draw.DrawInstruction[] instructions = player.getDrawInstructions
();
for (int i = 0; i < player.getObjectsToDraw(); i++)
{
if (instructions[i].obj.isVisible())
{
this.draw(instructions[i]);
}
foreach (com.brashmonkey.spriter.player.SpriterAbstractPlayer pl in player.getAttachedPlayers
())
{
if (player.getZIndex() == i)
{
draw(pl);
pl.drawn = true;
}
}
}
foreach (com.brashmonkey.spriter.player.SpriterAbstractPlayer pl_1 in player.getAttachedPlayers
())
{
if (!player.drawn)
{
draw(pl_1);
}
player.drawn = false;
}
}
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:34,代码来源:AbstractDrawer.cs
示例15: calcBoundingBox
public virtual void calcBoundingBox(com.brashmonkey.spriter.SpriterRectangle @base
)
{
this.boundingBox.set(@base);
foreach (com.brashmonkey.spriter.objects.SpriterObject @object in this.childObjects)
{
com.brashmonkey.spriter.SpriterPoint[] points = @object.getBoundingBox();
this.boundingBox.left = System.Math.Min(System.Math.Min(System.Math.Min(System.Math
.Min(points[0].x, points[1].x), points[2].x), points[3].x), this.boundingBox.left
);
this.boundingBox.right = System.Math.Max(System.Math.Max(System.Math.Max(System.Math
.Max(points[0].x, points[1].x), points[2].x), points[3].x), this.boundingBox.right
);
this.boundingBox.top = System.Math.Max(System.Math.Max(System.Math.Max(System.Math
.Max(points[0].y, points[1].y), points[2].y), points[3].y), this.boundingBox.top
);
this.boundingBox.bottom = System.Math.Min(System.Math.Min(System.Math.Min(System.Math
.Min(points[0].y, points[1].y), points[2].y), points[3].y), this.boundingBox.bottom
);
}
foreach (com.brashmonkey.spriter.objects.SpriterBone child in this.childBones)
{
child.calcBoundingBox(boundingBox);
this.boundingBox.set(child.boundingBox);
}
}
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:26,代码来源:SpriterBone.cs
示例16: setIcon
public void setIcon( com.github.cadencii.java.awt.Icon value ) {
if ( value == null ) {
base.Image = null;
} else {
base.Image = value.image;
}
}
开发者ID:kixtarte,项目名称:cadencii,代码行数:7,代码来源:BStatusLabel.cs
示例17: getNextFrameFor
public virtual com.brashmonkey.spriter.animation.SpriterKeyFrame getNextFrameFor(
com.brashmonkey.spriter.objects.SpriterAbstractObject @object, com.brashmonkey.spriter.animation.SpriterKeyFrame
currentFrame, int direction)
{
com.brashmonkey.spriter.animation.SpriterKeyFrame nextFrame = null;
int cnt = 0;
bool isBone = @object is com.brashmonkey.spriter.objects.SpriterBone;
for (int j = (currentFrame.getId() + direction + this.numberOfFrames()) % this.numberOfFrames();
nextFrame == null && cnt < this.numberOfFrames(); j = (j + direction + this.numberOfFrames()) %
this.numberOfFrames(), cnt++)
{
com.brashmonkey.spriter.animation.SpriterKeyFrame frame = this.frames[j];
bool contains = (isBone) ? frame.containsBone((com.brashmonkey.spriter.objects.SpriterBone
)@object) : frame.containsObject((com.brashmonkey.spriter.objects.SpriterObject)
@object);
if (contains)
{
com.brashmonkey.spriter.objects.SpriterAbstractObject objectInFrame;
if(isBone) objectInFrame = frame.getBoneFor((com.brashmonkey.spriter.objects.SpriterBone)@object);
else objectInFrame = frame.getObjectFor((com.brashmonkey.spriter.objects.SpriterObject)@object);
if (@object.equals(objectInFrame))
{
nextFrame = frame;
}
}
}
return nextFrame;
}
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:28,代码来源:SpriterAnimation.cs
示例18: OnMessage
public void OnMessage(com.sybase.afx.json.JsonMessage msg)
{
string _notification = msg.GetHeaders().GetNullableString("SUPObjCmd");
bool _reregistered = (_notification != null && _notification.Equals("reregister"));
if(_reregistered)
{
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSubscriptionEnd();
return;
}
string method = msg.GetHeaders().GetString("method");
bool _isAsync = "asyncReplayCompleted".Equals(method);
string serverRemoteId = msg.GetHeaders().GetNullableString("remoteId");
string clientRemoteId = GetRemoteId();
if(serverRemoteId != null && clientRemoteId != null && !serverRemoteId.Equals(clientRemoteId))
{
return;
}
bool _isTcn = "tcn".Equals(method);
if(!_isAsync && !_isTcn)
{
return;
}
com.sybase.afx.json.JsonObject _content = (com.sybase.afx.json.JsonObject)(msg.GetContent());
string userContext = _content.GetString("userContext");
string synchronizationGroup = _content.GetString("synchronizationGroup");
Sybase.Persistence.SynchronizationContext syncContext = new Sybase.Persistence.SynchronizationContext();
syncContext.UserContext = userContext;
Sybase.Collections.GenericList<Sybase.Persistence.ISynchronizationGroup> sgs = new Sybase.Collections.GenericList<Sybase.Persistence.ISynchronizationGroup>();
foreach(string sg in com.sybase.afx.util.StringUtil.GetCommaSeparatedList(synchronizationGroup))
{
sgs.Add(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetSynchronizationGroup(sg));
}
if(_isTcn)
{
syncContext.Status = Sybase.Persistence.SynchronizationStatus.STARTING_ON_NOTIFICATION;
}
else
{
syncContext.Status = Sybase.Persistence.SynchronizationStatus.ASYNC_REPLAY_COMPLETED;
}
if(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSynchronize(sgs, syncContext) == Sybase.Persistence.SynchronizationAction.CANCEL)
{
return;
}
try
{
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.BeginSynchronize(sgs, userContext);
}
catch(Sybase.Persistence.SynchronizeException ex)
{
syncContext.Exception = ex;
syncContext.Status = Sybase.Persistence.SynchronizationStatus.ERROR;
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSynchronize(sgs, syncContext);
throw ex;
}
syncContext.Status = Sybase.Persistence.SynchronizationStatus.FINISHING;
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSynchronize(sgs, syncContext);
}
开发者ID:hihack,项目名称:CRM.Mobile,代码行数:59,代码来源:CRMMobileDesaDB_ML.cs
示例19: loadAPIConfiguration
public bool loadAPIConfiguration(ref com.show.api.APISection customSection)
{
string configFile = System.IO.Path.Combine(
Environment.CurrentDirectory, configFileName);
if (!File.Exists(configFile))
{
return false;
}
// Map the new configuration file.
ExeConfigurationFileMap configFileMap =
new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
// Get the configuration file. The file name has
// this format appname.exe.config.
// Get the mapped configuration file
System.Configuration.Configuration config =
ConfigurationManager.OpenMappedExeConfiguration(
configFileMap, ConfigurationUserLevel.None);
try
{
// Create a custom configuration section
// having the same name that is used in the
// roaming configuration file.
// This is because the configuration section
// can be overridden by lower-level
// configuration files.
// See the GetRoamingConfiguration() function in
// this example.
string sectionName = "apiSection";
if (config.Sections[sectionName] == null)
{
return false;
}
// Set console properties using values
// stored in the configuration file.
customSection =
(com.show.api.APISection)config.GetSection(sectionName);
}
catch (ConfigurationErrorsException e)
{
Console.WriteLine("[Error exception: {0}]",
e.ToString());
}
// Display feedback.
Console.WriteLine();
Console.WriteLine("Using OpenExeConfiguration(string).");
// Display the current configuration file path.
Console.WriteLine("Configuration file is: {0}",
config.FilePath);
return true;
}
开发者ID:zhiyix,项目名称:stockmarket,代码行数:59,代码来源:UserProperties.cs
示例20: Result
public Result(com.google.javascript.jscomp.JSError[] par0, com.google.javascript.jscomp.JSError[] par1, global::java.lang.String par2, global::java.lang.Object par3, global::java.lang.Object par4, global::java.lang.Object par5, global::java.lang.Object par6, global::java.lang.Object par7, global::java.lang.String par8)
: base(((global::net.sf.jni4net.jni.JNIEnv)(null)))
{
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.ThreadEnv;
using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 28)){
@__env.NewObject(global::com.google.javascript.jscomp.Result.staticClass, global::com.google.javascript.jscomp.Result.j4n__ctorResult13, this, global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par0), global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par1), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par2), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par3), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par4), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par5), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par6), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par7), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par8));
}
}
开发者ID:MiguelCastillo,项目名称:jsCompiler,代码行数:8,代码来源:Result.generated.cs
注:本文中的com类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论